From 53b6d00f2fff577b5e23afec72c838bca6f0a80f Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Mon, 22 Jan 2024 09:54:41 -0400 Subject: [PATCH 01/22] 0.1.0 --- foundry/api_client.py | 2 +- foundry/versions.py | 2 +- pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/foundry/api_client.py b/foundry/api_client.py index d0031c84c..79bfe2dc1 100644 --- a/foundry/api_client.py +++ b/foundry/api_client.py @@ -102,7 +102,7 @@ def __init__( self.rest_client = rest.RESTClientObject(configuration) self.default_headers = { - "User-Agent": "foundry-platform-sdk/0.1.25", + "User-Agent": "foundry-platform-sdk/0.1.0", } if header_name is not None and header_value is not None: diff --git a/foundry/versions.py b/foundry/versions.py index 0bdd2597e..c593c8d22 100644 --- a/foundry/versions.py +++ b/foundry/versions.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.25" +__version__ = "0.1.0" __openapi_document_version__ = "1.738.0" __openapi_specification_version__ = "3.0.1" __openapi_generator_version__ = "7.1.0" diff --git a/pyproject.toml b/pyproject.toml index 272deb9ec..15e2d43d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "foundry" -version = "0.1.25" +version = "0.1.0" description = "The official Python library for the Foundry API" authors = ["Jacob Smith "] license = "Apache-2.0" From b747bdfa6b9cd03321d753a0393ac25bc3b2cc68 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Mon, 22 Jan 2024 20:48:55 -0400 Subject: [PATCH 02/22] remove --- .circleci/config.yml | 2 ++ foundry/api_client.py | 3 ++- foundry/versions.py | 2 +- pyproject.toml | 2 +- scripts/set_version.py | 27 +++++++++++++++++++++++++++ 5 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 scripts/set_version.py diff --git a/.circleci/config.yml b/.circleci/config.yml index a3e03d6c4..6d3d23095 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,6 +44,8 @@ jobs: - image: cimg/python:3.12 steps: - checkout + - run: python scripts/set_version.py + - run: poetry version $(git describe --tags --abbrev=0) - run: poetry publish -v -u $PYPI_USERNAME -p $PYPI_PASSWORD --build workflows: diff --git a/foundry/api_client.py b/foundry/api_client.py index 79bfe2dc1..0065c6846 100644 --- a/foundry/api_client.py +++ b/foundry/api_client.py @@ -49,6 +49,7 @@ from foundry.configuration import Configuration import foundry.models from foundry import rest +from foundry.versions import __version__ from foundry.exceptions import ( ApiValueError, ApiException, @@ -102,7 +103,7 @@ def __init__( self.rest_client = rest.RESTClientObject(configuration) self.default_headers = { - "User-Agent": "foundry-platform-sdk/0.1.0", + "User-Agent": f"foundry-platform-sdk/{__version__}", } if header_name is not None and header_value is not None: diff --git a/foundry/versions.py b/foundry/versions.py index c593c8d22..3f68d7342 100644 --- a/foundry/versions.py +++ b/foundry/versions.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.1.0" +__version__ = "0.0.0" __openapi_document_version__ = "1.738.0" __openapi_specification_version__ = "3.0.1" __openapi_generator_version__ = "7.1.0" diff --git a/pyproject.toml b/pyproject.toml index 15e2d43d8..ce73168f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "foundry" -version = "0.1.0" +version = "0.0.0" description = "The official Python library for the Foundry API" authors = ["Jacob Smith "] license = "Apache-2.0" diff --git a/scripts/set_version.py b/scripts/set_version.py new file mode 100644 index 000000000..f005bf03d --- /dev/null +++ b/scripts/set_version.py @@ -0,0 +1,27 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import subprocess + +gitversion = subprocess.check_output("git describe --tags --abbrev=0".split()).decode().strip() + +path = "{{packageName}}/versions.py" + +with open(path, "r") as f: + content = f.read() + +content = content.replace('__version__ = "0.0.0"', f'__version__ = "{gitversion}"') + +with open(path, "w") as f: + f.write(content) From 316bcc2146f20cf3f4de17c8e11d475971ac4819 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Mon, 22 Jan 2024 20:53:04 -0400 Subject: [PATCH 03/22] fix --- foundry/api/__init__.py | 1 + foundry/api/datasets_api_service_api.py | 1227 ++++++++++------- foundry/api/ontologies_api_service_api.py | 593 ++++---- foundry/api/ontologies_v2_api_service_api.py | 733 +++++----- foundry/api_client.py | 138 +- foundry/api_response.py | 5 +- foundry/configuration.py | 3 +- foundry/exceptions.py | 13 +- foundry/models/__init__.py | 128 +- .../abort_transaction_permission_denied.py | 36 +- ...ransaction_permission_denied_parameters.py | 32 +- .../models/action_contains_duplicate_edits.py | 30 +- .../action_edited_properties_not_found.py | 32 +- foundry/models/action_not_found.py | 32 +- foundry/models/action_not_found_parameters.py | 26 +- .../action_parameter_object_not_found.py | 38 +- ...n_parameter_object_not_found_parameters.py | 27 +- .../action_parameter_object_type_not_found.py | 38 +- foundry/models/action_parameter_type.py | 42 +- foundry/models/action_parameter_v2.py | 24 +- foundry/models/action_type.py | 43 +- foundry/models/action_type_not_found.py | 32 +- .../action_type_not_found_parameters.py | 33 +- foundry/models/action_type_v2.py | 43 +- foundry/models/action_validation_failed.py | 34 +- .../action_validation_failed_parameters.py | 27 +- .../aggregation_group_count_exceeded_limit.py | 38 +- ...n_group_count_exceeded_limit_parameters.py | 22 +- foundry/models/any_type.py | 22 +- .../models/api_feature_preview_usage_only.py | 32 +- foundry/models/api_usage_denied.py | 30 +- foundry/models/apply_action_failed.py | 30 +- foundry/models/apply_action_mode.py | 7 +- .../models/apply_action_request_options.py | 22 +- foundry/models/async_operation_error.py | 26 +- foundry/models/attachment_not_found.py | 34 +- .../models/attachment_not_found_parameters.py | 28 +- .../models/attachment_size_exceeded_limit.py | 38 +- ...tachment_size_exceeded_limit_parameters.py | 22 +- foundry/models/attachment_type.py | 22 +- foundry/models/binary_type.py | 22 +- foundry/models/boolean_type.py | 22 +- foundry/models/branch.py | 34 +- foundry/models/branch_already_exists.py | 32 +- .../branch_already_exists_parameters.py | 31 +- foundry/models/branch_not_found.py | 32 +- foundry/models/byte_type.py | 22 +- foundry/models/column_types_not_supported.py | 32 +- .../column_types_not_supported_parameters.py | 27 +- .../commit_transaction_permission_denied.py | 36 +- .../composite_primary_key_not_supported.py | 38 +- ...te_primary_key_not_supported_parameters.py | 27 +- .../models/create_branch_permission_denied.py | 32 +- foundry/models/create_branch_request.py | 32 +- .../create_dataset_permission_denied.py | 36 +- ...te_dataset_permission_denied_parameters.py | 22 +- foundry/models/create_dataset_request.py | 22 +- foundry/models/create_link_rule.py | 52 +- foundry/models/create_object_rule.py | 27 +- .../create_transaction_permission_denied.py | 32 +- foundry/models/create_transaction_request.py | 22 +- foundry/models/dataset.py | 26 +- foundry/models/dataset_not_found.py | 32 +- foundry/models/date_type.py | 22 +- foundry/models/decimal_type.py | 22 +- .../models/delete_branch_permission_denied.py | 32 +- foundry/models/delete_link_rule.py | 52 +- foundry/models/delete_object_rule.py | 27 +- .../models/delete_schema_permission_denied.py | 36 +- ...ete_schema_permission_denied_parameters.py | 37 +- foundry/models/deployment_api.py | 24 +- foundry/models/deployment_listing.py | 29 +- foundry/models/deployment_metadata.py | 31 +- foundry/models/deployment_not_available.py | 32 +- .../deployment_not_available_parameters.py | 22 +- foundry/models/deployment_not_found.py | 32 +- foundry/models/deployment_transform_api.py | 26 +- foundry/models/distance_unit.py | 21 +- foundry/models/double_type.py | 22 +- foundry/models/duplicate_order_by.py | 32 +- .../models/duplicate_order_by_parameters.py | 22 +- .../models/edit_object_permission_denied.py | 32 +- foundry/models/file.py | 31 +- foundry/models/file_already_exists.py | 32 +- .../models/file_already_exists_parameters.py | 36 +- foundry/models/file_not_found_on_branch.py | 32 +- .../file_not_found_on_branch_parameters.py | 35 +- .../file_not_found_on_transaction_range.py | 36 +- ...t_found_on_transaction_range_parameters.py | 48 +- foundry/models/float_type.py | 22 +- foundry/models/folder_not_found.py | 32 +- foundry/models/folder_not_found_parameters.py | 22 +- .../function_encountered_user_facing_error.py | 38 +- ...ncountered_user_facing_error_parameters.py | 32 +- foundry/models/function_execution_failed.py | 32 +- .../function_execution_failed_parameters.py | 32 +- .../models/function_execution_timed_out.py | 32 +- foundry/models/function_invalid_input.py | 32 +- foundry/models/geo_point.py | 33 +- foundry/models/geo_point_type.py | 22 +- foundry/models/geo_shape_type.py | 22 +- foundry/models/geometry.py | 39 +- foundry/models/integer_type.py | 22 +- foundry/models/invalid_aggregation_range.py | 32 +- ...invalid_aggregation_range_property_type.py | 38 +- ...regation_range_property_type_parameters.py | 37 +- .../models/invalid_aggregation_range_value.py | 38 +- ...invalid_apply_action_option_combination.py | 36 +- ...ly_action_option_combination_parameters.py | 28 +- foundry/models/invalid_branch_id.py | 32 +- .../models/invalid_branch_id_parameters.py | 26 +- foundry/models/invalid_content_length.py | 30 +- foundry/models/invalid_content_type.py | 32 +- ...invalid_duration_group_by_property_type.py | 38 +- .../models/invalid_duration_group_by_value.py | 32 +- foundry/models/invalid_fields.py | 32 +- foundry/models/invalid_fields_parameters.py | 22 +- foundry/models/invalid_group_id.py | 32 +- foundry/models/invalid_group_id_parameters.py | 22 +- foundry/models/invalid_page_size.py | 32 +- .../models/invalid_page_size_parameters.py | 26 +- foundry/models/invalid_page_token.py | 32 +- .../models/invalid_page_token_parameters.py | 27 +- .../models/invalid_parameter_combination.py | 36 +- ...nvalid_parameter_combination_parameters.py | 26 +- foundry/models/invalid_parameter_value.py | 34 +- .../invalid_parameter_value_parameters.py | 49 +- .../models/invalid_property_filter_value.py | 38 +- ...nvalid_property_filter_value_parameters.py | 48 +- .../invalid_property_filters_combination.py | 36 +- ...property_filters_combination_parameters.py | 27 +- foundry/models/invalid_property_type.py | 34 +- .../invalid_property_type_parameters.py | 32 +- foundry/models/invalid_property_value.py | 34 +- .../invalid_property_value_parameters.py | 39 +- .../models/invalid_query_parameter_value.py | 38 +- ...nvalid_query_parameter_value_parameters.py | 37 +- foundry/models/invalid_range_query.py | 34 +- .../models/invalid_range_query_parameters.py | 30 +- foundry/models/invalid_sort_order.py | 34 +- .../models/invalid_sort_order_parameters.py | 22 +- foundry/models/invalid_sort_type.py | 32 +- .../models/invalid_sort_type_parameters.py | 22 +- foundry/models/invalid_transaction_type.py | 32 +- .../invalid_transaction_type_parameters.py | 32 +- foundry/models/invalid_user_id.py | 32 +- foundry/models/invalid_user_id_parameters.py | 22 +- foundry/models/language_model_source.py | 7 +- .../language_model_source_not_supported.py | 36 +- ...e_model_source_not_supported_parameters.py | 22 +- foundry/models/line_string.py | 37 +- foundry/models/link_already_exists.py | 32 +- foundry/models/link_type_not_found.py | 32 +- .../models/link_type_not_found_parameters.py | 32 +- foundry/models/link_type_side.py | 53 +- foundry/models/link_type_side_cardinality.py | 7 +- foundry/models/link_type_side_v2.py | 53 +- foundry/models/linked_object_not_found.py | 32 +- .../linked_object_not_found_parameters.py | 42 +- foundry/models/list_action_types_response.py | 30 +- .../models/list_action_types_response_v2.py | 30 +- foundry/models/list_branches_response.py | 34 +- foundry/models/list_deployments_response.py | 24 +- foundry/models/list_files_response.py | 30 +- foundry/models/list_object_types_response.py | 34 +- .../models/list_object_types_v2_response.py | 34 +- foundry/models/list_ontologies_response.py | 28 +- foundry/models/list_ontologies_v2_response.py | 28 +- .../list_outgoing_link_types_response.py | 34 +- .../list_outgoing_link_types_response_v2.py | 34 +- foundry/models/list_query_types_response.py | 30 +- .../models/list_query_types_response_v2.py | 30 +- foundry/models/logic_rule.py | 9 +- foundry/models/long_type.py | 22 +- foundry/models/malformed_property_filters.py | 34 +- .../malformed_property_filters_parameters.py | 22 +- .../marketplace_action_mapping_not_found.py | 36 +- ...ace_action_mapping_not_found_parameters.py | 27 +- .../marketplace_installation_not_found.py | 38 +- ...place_installation_not_found_parameters.py | 22 +- .../marketplace_link_mapping_not_found.py | 36 +- ...place_link_mapping_not_found_parameters.py | 36 +- .../marketplace_object_mapping_not_found.py | 36 +- ...ace_object_mapping_not_found_parameters.py | 27 +- .../marketplace_query_mapping_not_found.py | 36 +- ...lace_query_mapping_not_found_parameters.py | 26 +- foundry/models/missing_parameter.py | 34 +- .../models/missing_parameter_parameters.py | 22 +- foundry/models/missing_post_body.py | 30 +- foundry/models/model_api_data_type.py | 26 +- foundry/models/model_api_type.py | 137 +- foundry/models/model_property.py | 31 +- foundry/models/modify_object_rule.py | 27 +- foundry/models/multi_line_string.py | 40 +- foundry/models/multi_point.py | 31 +- foundry/models/multi_polygon.py | 42 +- ...ultiple_group_by_on_field_not_supported.py | 38 +- ...up_by_on_field_not_supported_parameters.py | 22 +- .../multiple_property_values_not_supported.py | 38 +- ...roperty_values_not_supported_parameters.py | 32 +- foundry/models/null_type.py | 22 +- foundry/models/object_already_exists.py | 32 +- foundry/models/object_changed.py | 32 +- foundry/models/object_not_found.py | 32 +- foundry/models/object_not_found_parameters.py | 28 +- foundry/models/object_property_type.py | 47 +- foundry/models/object_type.py | 64 +- foundry/models/object_type_not_found.py | 32 +- .../object_type_not_found_parameters.py | 34 +- foundry/models/object_type_not_synced.py | 34 +- .../object_type_not_synced_parameters.py | 27 +- foundry/models/object_type_v2.py | 63 +- foundry/models/object_type_visibility.py | 9 +- foundry/models/object_type_with_link.py | 26 +- foundry/models/objects_exceeded_limit.py | 32 +- foundry/models/ontology.py | 30 +- foundry/models/ontology_data_type.py | 145 +- .../models/ontology_edits_exceeded_limit.py | 38 +- ...ntology_edits_exceeded_limit_parameters.py | 22 +- foundry/models/ontology_full_metadata.py | 30 +- foundry/models/ontology_not_found.py | 32 +- .../models/ontology_not_found_parameters.py | 28 +- foundry/models/ontology_object_set_type.py | 34 +- foundry/models/ontology_object_type.py | 32 +- foundry/models/ontology_syncing.py | 34 +- foundry/models/ontology_v2.py | 30 +- .../models/open_transaction_already_exists.py | 32 +- foundry/models/operation_not_found.py | 32 +- .../models/operation_not_found_parameters.py | 22 +- foundry/models/parameter.py | 29 +- foundry/models/parameter_object_not_found.py | 34 +- .../parameter_object_not_found_parameters.py | 27 +- .../parameter_object_set_rid_not_found.py | 38 +- ...ter_object_set_rid_not_found_parameters.py | 22 +- .../models/parameter_type_not_supported.py | 38 +- ...parameter_type_not_supported_parameters.py | 32 +- foundry/models/parameters_not_found.py | 34 +- .../models/parameters_not_found_parameters.py | 41 +- .../parent_attachment_permission_denied.py | 32 +- foundry/models/polygon.py | 40 +- foundry/models/properties_not_filterable.py | 34 +- foundry/models/properties_not_found.py | 32 +- .../models/properties_not_found_parameters.py | 27 +- foundry/models/properties_not_searchable.py | 34 +- .../properties_not_searchable_parameters.py | 22 +- foundry/models/properties_not_sortable.py | 34 +- foundry/models/property_api_name_not_found.py | 34 +- .../property_api_name_not_found_parameters.py | 32 +- .../property_base_type_not_supported.py | 38 +- .../models/property_filters_not_supported.py | 38 +- .../property_types_search_not_supported.py | 38 +- ...y_types_search_not_supported_parameters.py | 22 +- foundry/models/property_v2.py | 28 +- .../models/put_schema_permission_denied.py | 32 +- foundry/models/query_aggregation_key_type.py | 17 +- .../query_aggregation_range_sub_type.py | 12 +- .../models/query_aggregation_range_type.py | 24 +- .../models/query_aggregation_value_type.py | 12 +- foundry/models/query_data_type.py | 142 +- .../query_encountered_user_facing_error.py | 38 +- foundry/models/query_memory_exceeded_limit.py | 34 +- foundry/models/query_not_found.py | 32 +- foundry/models/query_not_found_parameters.py | 22 +- foundry/models/query_parameter_v2.py | 24 +- foundry/models/query_time_exceeded_limit.py | 34 +- foundry/models/query_type.py | 44 +- foundry/models/query_type_v2.py | 44 +- .../models/read_table_permission_denied.py | 32 +- foundry/models/release_status.py | 9 +- .../models/resource_name_already_exists.py | 36 +- ...resource_name_already_exists_parameters.py | 22 +- foundry/models/return_edits_mode.py | 7 +- foundry/models/schema_not_found.py | 36 +- foundry/models/short_type.py | 22 +- foundry/models/string_type.py | 22 +- foundry/models/table_export_format.py | 9 +- .../models/three_dimensional_aggregation.py | 26 +- foundry/models/time_series_item_type.py | 4 +- foundry/models/timeseries_type.py | 24 +- foundry/models/timestamp_type.py | 22 +- foundry/models/transaction.py | 43 +- foundry/models/transaction_not_committed.py | 32 +- .../transaction_not_committed_parameters.py | 32 +- foundry/models/transaction_not_found.py | 36 +- foundry/models/transaction_not_open.py | 32 +- foundry/models/transaction_status.py | 11 +- foundry/models/transaction_type.py | 13 +- foundry/models/two_dimensional_aggregation.py | 26 +- foundry/models/unknown_distance_unit.py | 32 +- .../unknown_distance_unit_parameters.py | 22 +- foundry/models/unknown_parameter.py | 34 +- .../models/unknown_parameter_parameters.py | 22 +- foundry/models/unsupported_object_set.py | 30 +- foundry/models/unsupported_type.py | 22 +- .../models/upload_file_permission_denied.py | 32 +- .../models/view_object_permission_denied.py | 34 +- foundry/rest.py | 72 +- scripts/set_version.py | 2 +- test/__init__.py | 1 + test/api/test_datasets_api_service_api.py | 4 +- test/models/test_create_dataset_request.py | 8 +- 301 files changed, 6503 insertions(+), 5508 deletions(-) diff --git a/foundry/api/__init__.py b/foundry/api/__init__.py index 4d4d04ad3..b78e6e4b0 100644 --- a/foundry/api/__init__.py +++ b/foundry/api/__init__.py @@ -18,3 +18,4 @@ from foundry.api.datasets_api_service_api import DatasetsApiServiceApi from foundry.api.ontologies_api_service_api import OntologiesApiServiceApi from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi + diff --git a/foundry/api/datasets_api_service_api.py b/foundry/api/datasets_api_service_api.py index 6277695da..9d1004d37 100644 --- a/foundry/api/datasets_api_service_api.py +++ b/foundry/api/datasets_api_service_api.py @@ -71,24 +71,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def abort_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """abort_transaction - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -100,9 +96,11 @@ def abort_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -113,24 +111,35 @@ def abort_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -139,7 +148,7 @@ def abort_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -151,24 +160,20 @@ def abort_transaction( @handle_unexpected def commit_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """commit_transaction - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -180,9 +185,11 @@ def commit_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -193,24 +200,35 @@ def commit_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -219,7 +237,7 @@ def commit_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -231,22 +249,20 @@ def commit_transaction( @handle_unexpected def create_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to create the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Branch.")], create_branch_request: CreateBranchRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Branch: """create_branch - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. (required) :type dataset_rid: str @@ -258,9 +274,11 @@ def create_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -271,7 +289,7 @@ def create_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters # process the header parameters # process the form parameters @@ -279,21 +297,37 @@ def create_branch( if create_branch_request is not None: _body_params = create_branch_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Branch" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/branches", + method='POST', + resource_path='/v1/datasets/{datasetRid}/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -302,7 +336,7 @@ def create_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -318,12 +352,15 @@ def create_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Dataset: """create_dataset - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param create_dataset_request: (required) :type create_dataset_request: CreateDatasetRequest @@ -333,9 +370,11 @@ def create_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -352,21 +391,37 @@ def create_dataset( if create_dataset_request is not None: _body_params = create_dataset_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dataset" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets", + method='POST', + resource_path='/v1/datasets', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -375,7 +430,7 @@ def create_dataset( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -387,34 +442,27 @@ def create_dataset( @handle_unexpected def create_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to create the Transaction." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Transaction.")], create_transaction_request: CreateTransactionRequest, - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. " - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """create_transaction - Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. (required) :type dataset_rid: str :param create_transaction_request: (required) :type create_transaction_request: CreateTransactionRequest - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. :type branch_id: str :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -422,9 +470,11 @@ def create_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -435,32 +485,49 @@ def create_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + # process the header parameters # process the form parameters # process the body parameter if create_transaction_request is not None: _body_params = create_transaction_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions", + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -469,7 +536,7 @@ def create_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -481,22 +548,20 @@ def create_transaction( @handle_unexpected def delete_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_branch - Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -508,9 +573,11 @@ def delete_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -521,21 +588,28 @@ def delete_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if branch_id is not None: - _path_params["branchId"] = branch_id + _path_params['branchId'] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} + _response_types_map: Dict[str, Optional[str]] = { + + } response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -544,7 +618,7 @@ def delete_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -556,34 +630,22 @@ def delete_branch( @handle_unexpected def delete_file( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to delete the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to delete the File.")], file_path: Annotated[StrictStr, Field(description="The File path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments." - ), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field( - description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File." - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_file - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. (required) :type dataset_rid: str @@ -599,9 +661,11 @@ def delete_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -612,27 +676,36 @@ def delete_file( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} + _response_types_map: Dict[str, Optional[str]] = { + + } response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -641,7 +714,7 @@ def delete_file( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -653,33 +726,28 @@ def delete_file( @handle_unexpected def delete_schema( self, - dataset_rid: Annotated[ - StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ") - ], - branch_id: Annotated[ - Optional[StrictStr], - Field(description="The ID of the Branch on which to delete the schema. "), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The RID of the Transaction on which to delete the schema. "), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ")], + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to delete the schema. ")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The RID of the Transaction on which to delete the schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_schema - Deletes the Schema from a Dataset and Branch. + Deletes the Schema from a Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to delete the schema. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch on which to delete the schema. + :param branch_id: The ID of the Branch on which to delete the schema. :type branch_id: str - :param transaction_rid: The RID of the Transaction on which to delete the schema. + :param transaction_rid: The RID of the Transaction on which to delete the schema. :type transaction_rid: str :param preview: :type preview: bool @@ -689,9 +757,11 @@ def delete_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -702,28 +772,38 @@ def delete_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} + _response_types_map: Dict[str, Optional[str]] = { + + } response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/schema", + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -732,7 +812,7 @@ def delete_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -744,22 +824,20 @@ def delete_schema( @handle_unexpected def get_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Branch: """get_branch - Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -771,9 +849,11 @@ def get_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -784,24 +864,35 @@ def get_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if branch_id is not None: - _path_params["branchId"] = branch_id + _path_params['branchId'] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Branch" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + method='GET', + resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -810,7 +901,7 @@ def get_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -826,12 +917,15 @@ def get_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Dataset: """get_dataset - Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: (required) :type dataset_rid: str @@ -841,9 +935,11 @@ def get_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -854,22 +950,33 @@ def get_dataset( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dataset" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}", + method='GET', + resource_path='/v1/datasets/{datasetRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -878,7 +985,7 @@ def get_dataset( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -890,36 +997,23 @@ def get_dataset( @handle_unexpected def get_file_content( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> bytearray: """get_file_content - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -937,9 +1031,11 @@ def get_file_content( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -950,33 +1046,47 @@ def get_file_content( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", + method='GET', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}/content', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -985,7 +1095,7 @@ def get_file_content( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -997,36 +1107,23 @@ def get_file_content( @handle_unexpected def get_file_metadata( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> File: """get_file_metadata - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -1044,9 +1141,11 @@ def get_file_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1057,33 +1156,47 @@ def get_file_metadata( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "File"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "File" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + method='GET', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1092,7 +1205,7 @@ def get_file_metadata( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1105,28 +1218,27 @@ def get_file_metadata( def get_schema( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - branch_id: Annotated[ - Optional[StrictStr], Field(description="The ID of the Branch. ") - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ") - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch. ")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> object: """get_schema - Retrieves the Schema for a Dataset and Branch, if it exists. + Retrieves the Schema for a Dataset and Branch, if it exists. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch. + :param branch_id: The ID of the Branch. :type branch_id: str - :param transaction_rid: The TransactionRid that contains the Schema. + :param transaction_rid: The TransactionRid that contains the Schema. :type transaction_rid: str :param preview: :type preview: bool @@ -1136,9 +1248,11 @@ def get_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1149,31 +1263,46 @@ def get_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "object", "204": None} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/schema", + method='GET', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1182,7 +1311,7 @@ def get_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1194,24 +1323,20 @@ def get_schema( @handle_unexpected def get_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """get_transaction - Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -1223,9 +1348,11 @@ def get_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1236,24 +1363,35 @@ def get_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", + method='GET', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1262,7 +1400,7 @@ def get_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1274,32 +1412,25 @@ def get_transaction( @handle_unexpected def list_branches( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to list Branches." - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Branches.")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListBranchesResponse: """list_branches - Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. (required) :type dataset_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1309,9 +1440,11 @@ def list_branches( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1322,28 +1455,41 @@ def list_branches( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListBranchesResponse"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListBranchesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches", + method='GET', + resource_path='/v1/datasets/{datasetRid}/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1352,7 +1498,7 @@ def list_branches( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1364,42 +1510,24 @@ def list_branches( @handle_unexpected def list_files( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to list Files." - ), - ], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Files.")], + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListFilesResponse: """list_files - Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. (required) :type dataset_rid: str @@ -1409,7 +1537,7 @@ def list_files( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1419,9 +1547,11 @@ def list_files( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1432,37 +1562,53 @@ def list_files( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListFilesResponse"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFilesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files", + method='GET', + resource_path='/v1/datasets/{datasetRid}/files', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1471,7 +1617,7 @@ def list_files( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1483,30 +1629,28 @@ def list_files( @handle_unexpected def put_schema( self, - dataset_rid: Annotated[ - StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ") - ], + dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ")], body: Dict[str, Any], - branch_id: Annotated[ - Optional[StrictStr], - Field(description="The ID of the Branch on which to put the Schema. "), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to put the Schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """put_schema - Puts a Schema on an existing Dataset and Branch. + Puts a Schema on an existing Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to put the Schema. (required) :type dataset_rid: str :param body: (required) :type body: object - :param branch_id: The ID of the Branch on which to put the Schema. + :param branch_id: The ID of the Branch on which to put the Schema. :type branch_id: str :param preview: :type preview: bool @@ -1516,9 +1660,11 @@ def put_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1529,32 +1675,46 @@ def put_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter if body is not None: _body_params = body + + # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} + _response_types_map: Dict[str, Optional[str]] = { + + } response_data = self._api_client.call_api( - method="PUT", - resource_path="/v1/datasets/{datasetRid}/schema", + method='PUT', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1563,7 +1723,7 @@ def put_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1576,47 +1736,25 @@ def put_schema( def read_table( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - format: Annotated[ - TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ") - ], - branch_id: Annotated[ - Optional[StrictStr], Field(description="The identifier (name) of the Branch.") - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, - columns: Annotated[ - Optional[List[StrictStr]], - Field( - description="A subset of the dataset columns to include in the result. Defaults to all columns. " - ), - ] = None, - row_limit: Annotated[ - Optional[StrictInt], - Field( - description="A limit on the number of rows to return. Note that row ordering is non-deterministic. " - ), - ] = None, - preview: Annotated[ - Optional[StrictBool], - Field( - description="A boolean flag that, when set to true, enables the use of beta features in preview mode. " - ), - ] = None, + format: Annotated[TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ")], + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + columns: Annotated[Optional[List[StrictStr]], Field(description="A subset of the dataset columns to include in the result. Defaults to all columns. ")] = None, + row_limit: Annotated[Optional[StrictInt], Field(description="A limit on the number of rows to return. Note that row ordering is non-deterministic. ")] = None, + preview: Annotated[Optional[StrictBool], Field(description="A boolean flag that, when set to true, enables the use of beta features in preview mode. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> bytearray: """read_table - :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str @@ -1628,11 +1766,11 @@ def read_table( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. :type columns: List[str] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. :type row_limit: int - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. :type preview: bool :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -1640,10 +1778,11 @@ def read_table( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _collection_formats: Dict[str, str] = { - "columns": "multi", + + 'columns': 'multi', } _path_params: Dict[str, str] = {} @@ -1655,43 +1794,61 @@ def read_table( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + if format is not None: - _query_params.append(("format", format.value)) - + + _query_params.append(('format', format.value)) + if columns is not None: - _query_params.append(("columns", columns)) - + + _query_params.append(('columns', columns)) + if row_limit is not None: - _query_params.append(("rowLimit", row_limit)) - + + _query_params.append(('rowLimit', row_limit)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/readTable", + method='GET', + resource_path='/v1/datasets/{datasetRid}/readTable', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1700,7 +1857,7 @@ def read_table( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1712,41 +1869,24 @@ def read_table( @handle_unexpected def upload_file( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to upload the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to upload the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], body: Union[StrictBytes, StrictStr], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments." - ), - ] = None, - transaction_type: Annotated[ - Optional[TransactionType], - Field( - description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`." - ), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field( - description="The Resource Identifier (RID) of the open Transaction on which to upload the File." - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.")] = None, + transaction_type: Annotated[Optional[TransactionType], Field(description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`.")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open Transaction on which to upload the File.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> File: """upload_file - Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. (required) :type dataset_rid: str @@ -1766,9 +1906,11 @@ def upload_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1779,20 +1921,24 @@ def upload_file( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if file_path is not None: - _query_params.append(("filePath", file_path)) - + + _query_params.append(('filePath', file_path)) + if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_type is not None: - _query_params.append(("transactionType", transaction_type.value)) - + + _query_params.append(('transactionType', transaction_type.value)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter @@ -1804,16 +1950,27 @@ def upload_file( else: _body_params = body + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "File"} + _response_types_map: Dict[str, Optional[str]] = { + '200': "File" + + } response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/files:upload", + method='POST', + resource_path='/v1/datasets/{datasetRid}/files:upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1822,7 +1979,7 @@ def upload_file( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api/ontologies_api_service_api.py b/foundry/api/ontologies_api_service_api.py index 021378b54..cf3e1415a 100644 --- a/foundry/api/ontologies_api_service_api.py +++ b/foundry/api/ontologies_api_service_api.py @@ -70,24 +70,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the action type. " - ), - ], - action_type_api_name: Annotated[ - StrictStr, Field(description="The name of the action type in the API. ") - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action type. ")], + action_type_api_name: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ActionType: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. (required) :type ontology_rid: str @@ -99,9 +95,11 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -112,24 +110,35 @@ def get_action_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if action_type_api_name is not None: - _path_params["actionTypeApiName"] = action_type_api_name + _path_params['actionTypeApiName'] = action_type_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionType"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionType" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -138,7 +147,7 @@ def get_action_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -150,27 +159,20 @@ def get_action_type( @handle_unexpected def get_object_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ObjectType: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -182,9 +184,11 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -195,24 +199,35 @@ def get_object_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectType"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ObjectType" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -221,7 +236,7 @@ def get_object_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -233,21 +248,19 @@ def get_object_type( @handle_unexpected def get_ontology( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Ontology: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -257,9 +270,11 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -270,22 +285,33 @@ def get_ontology( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "Ontology"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Ontology" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -294,7 +320,7 @@ def get_ontology( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -306,33 +332,21 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - link_type: Annotated[ - StrictStr, - Field( - description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> LinkTypeSide: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -346,9 +360,11 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -359,26 +375,37 @@ def get_outgoing_link_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type if link_type is not None: - _path_params["linkType"] = link_type + _path_params['linkType'] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSide"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LinkTypeSide" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -387,7 +414,7 @@ def get_outgoing_link_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -399,28 +426,21 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - query_api_name: Annotated[ - StrictStr, - Field( - description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> QueryType: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -434,9 +454,11 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -447,27 +469,39 @@ def get_query_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if query_api_name is not None: - _path_params["queryApiName"] = query_api_name + _path_params['queryApiName'] = query_api_name # process the query parameters if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "QueryType"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryType" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -476,7 +510,7 @@ def get_query_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -488,32 +522,25 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListActionTypesResponse: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -523,9 +550,11 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -536,28 +565,41 @@ def list_action_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListActionTypesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/actionTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -566,7 +608,7 @@ def list_action_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -578,32 +620,25 @@ def list_action_types( @handle_unexpected def list_object_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListObjectTypesResponse: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -613,9 +648,11 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -626,28 +663,41 @@ def list_object_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListObjectTypesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -656,7 +706,7 @@ def list_object_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -671,12 +721,15 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOntologiesResponse: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -684,9 +737,11 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -701,16 +756,27 @@ def list_ontologies( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOntologiesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies", + method='GET', + resource_path='/v1/ontologies', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -719,7 +785,7 @@ def list_ontologies( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -731,31 +797,22 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], Field(description="The desired size of the page to be returned.") - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOutgoingLinkTypesResponse: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -771,9 +828,11 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -784,30 +843,43 @@ def list_outgoing_link_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOutgoingLinkTypesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -816,7 +888,7 @@ def list_outgoing_link_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -828,33 +900,26 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListQueryTypesResponse: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -866,9 +931,11 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -879,31 +946,45 @@ def list_query_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListQueryTypesResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes", + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/queryTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -912,7 +993,7 @@ def list_query_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api/ontologies_v2_api_service_api.py b/foundry/api/ontologies_v2_api_service_api.py index e16adadda..ed4d498c1 100644 --- a/foundry/api/ontologies_v2_api_service_api.py +++ b/foundry/api/ontologies_v2_api_service_api.py @@ -73,24 +73,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - action_type: Annotated[ - StrictStr, Field(description="The name of the action type in the API. ") - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + action_type: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ActionTypeV2: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -102,9 +98,11 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -115,24 +113,35 @@ def get_action_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if action_type is not None: - _path_params["actionType"] = action_type + _path_params['actionType'] = action_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionTypeV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionTypeV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", + method='GET', + resource_path='/v2/ontologies/{ontology}/actionTypes/{actionType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -141,7 +150,7 @@ def get_action_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -153,27 +162,20 @@ def get_action_type( @handle_unexpected def get_deployment( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - deployment: Annotated[ - StrictStr, - Field( - description="The API name of the deployment you want to fetch information about. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + deployment: Annotated[StrictStr, Field(description="The API name of the deployment you want to fetch information about. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> DeploymentMetadata: """get_deployment - Fetches information about a model deployment within a given Ontology. + Fetches information about a model deployment within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -185,9 +187,11 @@ def get_deployment( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -198,24 +202,35 @@ def get_deployment( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if deployment is not None: - _path_params["deployment"] = deployment + _path_params['deployment'] = deployment # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "DeploymentMetadata"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentMetadata" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/models/deployments/{deployment}", + method='GET', + resource_path='/v2/ontologies/{ontology}/models/deployments/{deployment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -224,7 +239,7 @@ def get_deployment( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -236,27 +251,20 @@ def get_deployment( @handle_unexpected def get_object_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ObjectTypeV2: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -268,9 +276,11 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -281,24 +291,35 @@ def get_object_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectTypeV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ObjectTypeV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -307,7 +328,7 @@ def get_object_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -319,21 +340,19 @@ def get_object_type( @handle_unexpected def get_ontology_full_metadata( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> OntologyFullMetadata: """get_ontology_full_metadata - Get the full Ontology metadata. This includes the objects, links, actions, and queries. + Get the full Ontology metadata. This includes the objects, links, actions, and queries. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -343,9 +362,11 @@ def get_ontology_full_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -356,22 +377,33 @@ def get_ontology_full_metadata( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyFullMetadata"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OntologyFullMetadata" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/fullMetadata", + method='GET', + resource_path='/v2/ontologies/{ontology}/fullMetadata', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -380,7 +412,7 @@ def get_ontology_full_metadata( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -392,21 +424,19 @@ def get_ontology_full_metadata( @handle_unexpected def get_ontology( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> OntologyV2: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -416,9 +446,11 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -429,22 +461,33 @@ def get_ontology( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OntologyV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}", + method='GET', + resource_path='/v2/ontologies/{ontology}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -453,7 +496,7 @@ def get_ontology( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -465,33 +508,21 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - link_type: Annotated[ - StrictStr, - Field( - description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> LinkTypeSideV2: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -505,9 +536,11 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -518,26 +551,37 @@ def get_outgoing_link_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type if link_type is not None: - _path_params["linkType"] = link_type + _path_params['linkType'] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSideV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LinkTypeSideV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -546,7 +590,7 @@ def get_outgoing_link_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -558,27 +602,20 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - query_api_name: Annotated[ - StrictStr, - Field( - description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> QueryTypeV2: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -590,9 +627,11 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -603,24 +642,35 @@ def get_query_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if query_api_name is not None: - _path_params["queryApiName"] = query_api_name + _path_params['queryApiName'] = query_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "QueryTypeV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryTypeV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", + method='GET', + resource_path='/v2/ontologies/{ontology}/queryTypes/{queryApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -629,7 +679,7 @@ def get_query_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -641,32 +691,25 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListActionTypesResponseV2: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -676,9 +719,11 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -689,28 +734,41 @@ def list_action_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponseV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListActionTypesResponseV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes", + method='GET', + resource_path='/v2/ontologies/{ontology}/actionTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -719,7 +777,7 @@ def list_action_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -731,21 +789,19 @@ def list_action_types( @handle_unexpected def list_deployments( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListDeploymentsResponse: """list_deployments - Fetches a list of the available model deployments within a given Ontology. + Fetches a list of the available model deployments within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -755,9 +811,11 @@ def list_deployments( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -768,22 +826,33 @@ def list_deployments( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListDeploymentsResponse"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDeploymentsResponse" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/models/deployments", + method='GET', + resource_path='/v2/ontologies/{ontology}/models/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -792,7 +861,7 @@ def list_deployments( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -804,32 +873,25 @@ def list_deployments( @handle_unexpected def list_object_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListObjectTypesV2Response: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -839,9 +901,11 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -852,28 +916,41 @@ def list_object_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesV2Response"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListObjectTypesV2Response" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes", + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -882,7 +959,7 @@ def list_object_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -897,12 +974,15 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOntologiesV2Response: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -910,9 +990,11 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -927,16 +1009,27 @@ def list_ontologies( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesV2Response"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOntologiesV2Response" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies", + method='GET', + resource_path='/v2/ontologies', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -945,7 +1038,7 @@ def list_ontologies( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -957,31 +1050,22 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], Field(description="The desired size of the page to be returned.") - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOutgoingLinkTypesResponseV2: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -997,9 +1081,11 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1010,30 +1096,43 @@ def list_outgoing_link_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponseV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOutgoingLinkTypesResponseV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1042,7 +1141,7 @@ def list_outgoing_link_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( @@ -1054,32 +1153,25 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListQueryTypesResponseV2: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1089,9 +1181,11 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1102,28 +1196,41 @@ def list_query_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponseV2"} + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListQueryTypesResponseV2" + + } response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes", + method='GET', + resource_path='/v2/ontologies/{ontology}/queryTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1132,7 +1239,7 @@ def list_query_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, + _request_timeout=_request_timeout ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api_client.py b/foundry/api_client.py index 0065c6846..63c0d7ffa 100644 --- a/foundry/api_client.py +++ b/foundry/api_client.py @@ -81,14 +81,14 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - "int": int, - "long": int, # TODO remove as only py3 is supported? - "float": float, - "str": str, - "bool": bool, - "date": datetime.date, - "datetime": datetime.datetime, - "object": object, + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, } _pool = None @@ -131,7 +131,7 @@ def call_api( files=None, auth_settings=None, collection_formats=None, - _request_timeout=None, + _request_timeout=None ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -157,21 +157,30 @@ def call_api( headers = header_params or {} headers.update(self.default_headers) if self.cookie: - headers["Cookie"] = self.cookie + headers['Cookie'] = self.cookie # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples(path_params, collection_formats) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) for k, v in path_params: # specified safe chars, encode everything - resource_path = resource_path.replace("{%s}" % k, quote(str(v))) + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v)) + ) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) post_params.extend(self.files_parameters(files)) # body @@ -183,13 +192,16 @@ def call_api( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) url += "?" + url_query def send_request(token: Optional[Token]): if token is not None: headers["Authorization"] = "Bearer " + token.access_token - + return self.rest_client.request( method, url, @@ -216,11 +228,7 @@ def response_deserialize( """ response_type = response_types_map.get(str(response_data.status), None) - if ( - not response_type - and isinstance(response_data.status, int) - and 100 <= response_data.status <= 599 - ): + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) @@ -257,7 +265,7 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) else: match = None - content_type = response_data.getheader("content-type") + content_type = response_data.getheader('content-type') if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" @@ -266,10 +274,10 @@ def response_deserialize( return_data = self.deserialize(response_text, response_type) return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), # type: ignore - raw_data=response_data.data, + status_code = response_data.status, + data = return_data, + headers = response_data.getheaders(), # type: ignore + raw_data = response_data.data ) def sanitize_for_serialization(self, obj): @@ -291,9 +299,13 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] elif isinstance(obj, tuple): - return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() @@ -307,7 +319,10 @@ def sanitize_for_serialization(self, obj): # model definition for request. obj_dict = obj.to_dict() - return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} + return { + key: self.sanitize_for_serialization(val) + for key, val in obj_dict.items() + } def deserialize(self, response_text, response_type): """Deserializes response into an object. @@ -339,19 +354,21 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith("List["): + if klass.startswith('List['): sub_kls = error_if_none( re.match(r"List\[(.*)]", klass), error_message="Failed to fetch inner contents of List[].", ).group(1) - return [self.__deserialize(sub_data, sub_kls) for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] - if klass.startswith("Dict["): + if klass.startswith('Dict['): sub_kls = error_if_none( re.match(r"Dict\[([^,]*), (.*)]", klass), error_message="Failed to fetch inner contents of Dict[].", ).group(2) - return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -383,18 +400,19 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": + if collection_format == 'multi': new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(str(value) for value in v))) + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -419,18 +437,20 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == "multi": + if collection_format == 'multi': new_params.extend((k, value) for value in v) else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(quote(str(value)) for value in v))) + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) else: new_params.append((k, quote(str(v)))) @@ -450,11 +470,16 @@ def files_parameters(self, files=None): continue file_names = v if type(v) is list else [v] for n in file_names: - with open(n, "rb") as f: + with open(n, 'rb') as f: filename = os.path.basename(f.name) filedata = f.read() - mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" - params.append(tuple([k, tuple([filename, filedata, mimetype])])) + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) return params @@ -468,7 +493,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search("json", accept, re.IGNORECASE): + if re.search('json', accept, re.IGNORECASE): return accept return accepts[0] @@ -483,7 +508,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search("json", content_type, re.IGNORECASE): + if re.search('json', content_type, re.IGNORECASE): return content_type return content_types[0] @@ -577,7 +602,7 @@ def __deserialize_model(self, data, klass): # First, check if this is a class model. If so, we can just use the # "from_dict" method. - # If it isn't a class, check if there is an available type adapter we can use. + # If it isn't a class, check if there is an available type adapter we can use. # We need type adapters ince some types (e.g. unions cannot natively validated). if hasattr(klass, "from_dict"): return klass.from_dict(data, allow_extra=True) @@ -589,7 +614,6 @@ def __deserialize_model(self, data, klass): T = TypeVar("T") - def error_if_none(o: Optional[T], error_message: str) -> T: if o is None: raise SDKInternalError(error_message) diff --git a/foundry/api_response.py b/foundry/api_response.py index 287dd06dc..ea6abb978 100644 --- a/foundry/api_response.py +++ b/foundry/api_response.py @@ -20,7 +20,6 @@ T = TypeVar("T") - class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -31,4 +30,6 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = {"arbitrary_types_allowed": True} + model_config = { + "arbitrary_types_allowed": True + } diff --git a/foundry/configuration.py b/foundry/configuration.py index c7273d55e..bfb02d22f 100644 --- a/foundry/configuration.py +++ b/foundry/configuration.py @@ -49,7 +49,7 @@ def __init__(self, auth: Auth) -> None: self.logger["urllib3_logger"] = logging.getLogger("urllib3") """Log format""" - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log stream handler""" self.logger_stream_handler = None @@ -63,6 +63,7 @@ def __init__(self, auth: Auth) -> None: """Debug file location""" self.debug = False + """Adding retries to override urllib3 default value 3""" self.retries = None diff --git a/foundry/exceptions.py b/foundry/exceptions.py index 9564c4a42..8c52c5710 100644 --- a/foundry/exceptions.py +++ b/foundry/exceptions.py @@ -42,7 +42,6 @@ from pydantic_core import __version__ as __pydantic_core__version__ from pydantic import ValidationError - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -54,7 +53,7 @@ def __init__(self, msg: str) -> None: def __str__(self): message = self.msg - sys_version = sys.version.replace("\n", " ") + sys_version = sys.version.replace('\n', ' ') message += ( "\n\nThis is an unexpected issue and should be reported. " "When filing an issue, make sure to copy the package information " @@ -64,9 +63,9 @@ def __str__(self): f"SDK Version: {__version__}\n" f"OpenAPI Document Version: {__openapi_document_version__}\n" f"OpenAPI Specification Version: {__openapi_specification_version__}\n" - f"OpenAPI Generator Version: {__openapi_generator_version__}\n" - f"Pydantic Version: {__pydantic__version__}\n" - f"Pydantic Core Version: {__pydantic_core__version__}\n" + f"OpenAPI Generator Version: {__openapi_generator_version__}\n" + f"Pydantic Version: {__pydantic__version__}\n" + f"Pydantic Core Version: {__pydantic_core__version__}\n" ) return message @@ -168,7 +167,7 @@ def __init__( self.json = json.loads(self.body or "") except Exception as e: raise SDKInternalError(f"Unable to parse error body: {self.body}") - + try: self.error_code = self.json["errorCode"] self.error_name = self.json["errorName"] @@ -188,7 +187,6 @@ def __str__(self): return error_message - class BadRequestException(ApiException): pass @@ -219,7 +217,6 @@ def render_path(path_to_item): result += "['{0}']".format(pth) return result - # Delayed import since the rest module imports exceptions from the module from foundry.rest import RESTResponse from foundry.rest import Urllib3Response diff --git a/foundry/models/__init__.py b/foundry/models/__init__.py index 19f4cc5a3..9bc805307 100644 --- a/foundry/models/__init__.py +++ b/foundry/models/__init__.py @@ -29,18 +29,14 @@ # import models into model package from foundry.models.abort_transaction_permission_denied import AbortTransactionPermissionDenied -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) +from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters from foundry.models.action_contains_duplicate_edits import ActionContainsDuplicateEdits from foundry.models.action_edited_properties_not_found import ActionEditedPropertiesNotFound from foundry.models.action_not_found import ActionNotFound from foundry.models.action_not_found_parameters import ActionNotFoundParameters from foundry.models.action_parameter_type import ActionParameterArrayType from foundry.models.action_parameter_object_not_found import ActionParameterObjectNotFound -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) +from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters from foundry.models.action_parameter_object_type_not_found import ActionParameterObjectTypeNotFound from foundry.models.action_parameter_type import ActionParameterType from foundry.models.action_parameter_v2 import ActionParameterV2 @@ -51,9 +47,7 @@ from foundry.models.action_validation_failed import ActionValidationFailed from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters from foundry.models.aggregation_group_count_exceeded_limit import AggregationGroupCountExceededLimit -from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( - AggregationGroupCountExceededLimitParameters, -) +from foundry.models.aggregation_group_count_exceeded_limit_parameters import AggregationGroupCountExceededLimitParameters from foundry.models.any_type import AnyType from foundry.models.api_feature_preview_usage_only import ApiFeaturePreviewUsageOnly from foundry.models.api_usage_denied import ApiUsageDenied @@ -64,9 +58,7 @@ from foundry.models.attachment_not_found import AttachmentNotFound from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters from foundry.models.attachment_size_exceeded_limit import AttachmentSizeExceededLimit -from foundry.models.attachment_size_exceeded_limit_parameters import ( - AttachmentSizeExceededLimitParameters, -) +from foundry.models.attachment_size_exceeded_limit_parameters import AttachmentSizeExceededLimitParameters from foundry.models.attachment_type import AttachmentType from foundry.models.binary_type import BinaryType from foundry.models.boolean_type import BooleanType @@ -79,15 +71,11 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from foundry.models.commit_transaction_permission_denied import CommitTransactionPermissionDenied from foundry.models.composite_primary_key_not_supported import CompositePrimaryKeyNotSupported -from foundry.models.composite_primary_key_not_supported_parameters import ( - CompositePrimaryKeyNotSupportedParameters, -) +from foundry.models.composite_primary_key_not_supported_parameters import CompositePrimaryKeyNotSupportedParameters from foundry.models.create_branch_permission_denied import CreateBranchPermissionDenied from foundry.models.create_branch_request import CreateBranchRequest from foundry.models.create_dataset_permission_denied import CreateDatasetPermissionDenied -from foundry.models.create_dataset_permission_denied_parameters import ( - CreateDatasetPermissionDeniedParameters, -) +from foundry.models.create_dataset_permission_denied_parameters import CreateDatasetPermissionDeniedParameters from foundry.models.create_dataset_request import CreateDatasetRequest from foundry.models.create_link_rule import CreateLinkRule from foundry.models.create_object_rule import CreateObjectRule @@ -101,9 +89,7 @@ from foundry.models.delete_link_rule import DeleteLinkRule from foundry.models.delete_object_rule import DeleteObjectRule from foundry.models.delete_schema_permission_denied import DeleteSchemaPermissionDenied -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) +from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters from foundry.models.deployment_api import DeploymentApi from foundry.models.deployment_listing import DeploymentListing from foundry.models.deployment_metadata import DeploymentMetadata @@ -122,16 +108,12 @@ from foundry.models.file_not_found_on_branch import FileNotFoundOnBranch from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters from foundry.models.file_not_found_on_transaction_range import FileNotFoundOnTransactionRange -from foundry.models.file_not_found_on_transaction_range_parameters import ( - FileNotFoundOnTransactionRangeParameters, -) +from foundry.models.file_not_found_on_transaction_range_parameters import FileNotFoundOnTransactionRangeParameters from foundry.models.float_type import FloatType from foundry.models.folder_not_found import FolderNotFound from foundry.models.folder_not_found_parameters import FolderNotFoundParameters from foundry.models.function_encountered_user_facing_error import FunctionEncounteredUserFacingError -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) +from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters from foundry.models.function_execution_failed import FunctionExecutionFailed from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from foundry.models.function_execution_timed_out import FunctionExecutionTimedOut @@ -143,26 +125,16 @@ from foundry.models.geometry import GeometryCollection from foundry.models.integer_type import IntegerType from foundry.models.invalid_aggregation_range import InvalidAggregationRange -from foundry.models.invalid_aggregation_range_property_type import ( - InvalidAggregationRangePropertyType, -) -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) +from foundry.models.invalid_aggregation_range_property_type import InvalidAggregationRangePropertyType +from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters from foundry.models.invalid_aggregation_range_value import InvalidAggregationRangeValue -from foundry.models.invalid_apply_action_option_combination import ( - InvalidApplyActionOptionCombination, -) -from foundry.models.invalid_apply_action_option_combination_parameters import ( - InvalidApplyActionOptionCombinationParameters, -) +from foundry.models.invalid_apply_action_option_combination import InvalidApplyActionOptionCombination +from foundry.models.invalid_apply_action_option_combination_parameters import InvalidApplyActionOptionCombinationParameters from foundry.models.invalid_branch_id import InvalidBranchId from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters from foundry.models.invalid_content_length import InvalidContentLength from foundry.models.invalid_content_type import InvalidContentType -from foundry.models.invalid_duration_group_by_property_type import ( - InvalidDurationGroupByPropertyType, -) +from foundry.models.invalid_duration_group_by_property_type import InvalidDurationGroupByPropertyType from foundry.models.invalid_duration_group_by_value import InvalidDurationGroupByValue from foundry.models.invalid_fields import InvalidFields from foundry.models.invalid_fields_parameters import InvalidFieldsParameters @@ -173,27 +145,19 @@ from foundry.models.invalid_page_token import InvalidPageToken from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters from foundry.models.invalid_parameter_combination import InvalidParameterCombination -from foundry.models.invalid_parameter_combination_parameters import ( - InvalidParameterCombinationParameters, -) +from foundry.models.invalid_parameter_combination_parameters import InvalidParameterCombinationParameters from foundry.models.invalid_parameter_value import InvalidParameterValue from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters from foundry.models.invalid_property_filter_value import InvalidPropertyFilterValue -from foundry.models.invalid_property_filter_value_parameters import ( - InvalidPropertyFilterValueParameters, -) +from foundry.models.invalid_property_filter_value_parameters import InvalidPropertyFilterValueParameters from foundry.models.invalid_property_filters_combination import InvalidPropertyFiltersCombination -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) +from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters from foundry.models.invalid_property_type import InvalidPropertyType from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters from foundry.models.invalid_property_value import InvalidPropertyValue from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters from foundry.models.invalid_query_parameter_value import InvalidQueryParameterValue -from foundry.models.invalid_query_parameter_value_parameters import ( - InvalidQueryParameterValueParameters, -) +from foundry.models.invalid_query_parameter_value_parameters import InvalidQueryParameterValueParameters from foundry.models.invalid_range_query import InvalidRangeQuery from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters from foundry.models.invalid_sort_order import InvalidSortOrder @@ -206,9 +170,7 @@ from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters from foundry.models.language_model_source import LanguageModelSource from foundry.models.language_model_source_not_supported import LanguageModelSourceNotSupported -from foundry.models.language_model_source_not_supported_parameters import ( - LanguageModelSourceNotSupportedParameters, -) +from foundry.models.language_model_source_not_supported_parameters import LanguageModelSourceNotSupportedParameters from foundry.models.line_string import LineString from foundry.models.link_already_exists import LinkAlreadyExists from foundry.models.link_type_not_found import LinkTypeNotFound @@ -236,25 +198,15 @@ from foundry.models.malformed_property_filters import MalformedPropertyFilters from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters from foundry.models.marketplace_action_mapping_not_found import MarketplaceActionMappingNotFound -from foundry.models.marketplace_action_mapping_not_found_parameters import ( - MarketplaceActionMappingNotFoundParameters, -) +from foundry.models.marketplace_action_mapping_not_found_parameters import MarketplaceActionMappingNotFoundParameters from foundry.models.marketplace_installation_not_found import MarketplaceInstallationNotFound -from foundry.models.marketplace_installation_not_found_parameters import ( - MarketplaceInstallationNotFoundParameters, -) +from foundry.models.marketplace_installation_not_found_parameters import MarketplaceInstallationNotFoundParameters from foundry.models.marketplace_link_mapping_not_found import MarketplaceLinkMappingNotFound -from foundry.models.marketplace_link_mapping_not_found_parameters import ( - MarketplaceLinkMappingNotFoundParameters, -) +from foundry.models.marketplace_link_mapping_not_found_parameters import MarketplaceLinkMappingNotFoundParameters from foundry.models.marketplace_object_mapping_not_found import MarketplaceObjectMappingNotFound -from foundry.models.marketplace_object_mapping_not_found_parameters import ( - MarketplaceObjectMappingNotFoundParameters, -) +from foundry.models.marketplace_object_mapping_not_found_parameters import MarketplaceObjectMappingNotFoundParameters from foundry.models.marketplace_query_mapping_not_found import MarketplaceQueryMappingNotFound -from foundry.models.marketplace_query_mapping_not_found_parameters import ( - MarketplaceQueryMappingNotFoundParameters, -) +from foundry.models.marketplace_query_mapping_not_found_parameters import MarketplaceQueryMappingNotFoundParameters from foundry.models.missing_parameter import MissingParameter from foundry.models.missing_parameter_parameters import MissingParameterParameters from foundry.models.missing_post_body import MissingPostBody @@ -270,16 +222,10 @@ from foundry.models.multi_line_string import MultiLineString from foundry.models.multi_point import MultiPoint from foundry.models.multi_polygon import MultiPolygon -from foundry.models.multiple_group_by_on_field_not_supported import ( - MultipleGroupByOnFieldNotSupported, -) -from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( - MultipleGroupByOnFieldNotSupportedParameters, -) +from foundry.models.multiple_group_by_on_field_not_supported import MultipleGroupByOnFieldNotSupported +from foundry.models.multiple_group_by_on_field_not_supported_parameters import MultipleGroupByOnFieldNotSupportedParameters from foundry.models.multiple_property_values_not_supported import MultiplePropertyValuesNotSupported -from foundry.models.multiple_property_values_not_supported_parameters import ( - MultiplePropertyValuesNotSupportedParameters, -) +from foundry.models.multiple_property_values_not_supported_parameters import MultiplePropertyValuesNotSupportedParameters from foundry.models.null_type import NullType from foundry.models.object_already_exists import ObjectAlreadyExists from foundry.models.object_changed import ObjectChanged @@ -299,9 +245,7 @@ from foundry.models.ontology_data_type import OntologyArrayType from foundry.models.ontology_data_type import OntologyDataType from foundry.models.ontology_edits_exceeded_limit import OntologyEditsExceededLimit -from foundry.models.ontology_edits_exceeded_limit_parameters import ( - OntologyEditsExceededLimitParameters, -) +from foundry.models.ontology_edits_exceeded_limit_parameters import OntologyEditsExceededLimitParameters from foundry.models.ontology_full_metadata import OntologyFullMetadata from foundry.models.ontology_data_type import OntologyMapType from foundry.models.ontology_not_found import OntologyNotFound @@ -321,13 +265,9 @@ from foundry.models.parameter_object_not_found import ParameterObjectNotFound from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters from foundry.models.parameter_object_set_rid_not_found import ParameterObjectSetRidNotFound -from foundry.models.parameter_object_set_rid_not_found_parameters import ( - ParameterObjectSetRidNotFoundParameters, -) +from foundry.models.parameter_object_set_rid_not_found_parameters import ParameterObjectSetRidNotFoundParameters from foundry.models.parameter_type_not_supported import ParameterTypeNotSupported -from foundry.models.parameter_type_not_supported_parameters import ( - ParameterTypeNotSupportedParameters, -) +from foundry.models.parameter_type_not_supported_parameters import ParameterTypeNotSupportedParameters from foundry.models.parameters_not_found import ParametersNotFound from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters from foundry.models.parent_attachment_permission_denied import ParentAttachmentPermissionDenied @@ -343,9 +283,7 @@ from foundry.models.property_base_type_not_supported import PropertyBaseTypeNotSupported from foundry.models.property_filters_not_supported import PropertyFiltersNotSupported from foundry.models.property_types_search_not_supported import PropertyTypesSearchNotSupported -from foundry.models.property_types_search_not_supported_parameters import ( - PropertyTypesSearchNotSupportedParameters, -) +from foundry.models.property_types_search_not_supported_parameters import PropertyTypesSearchNotSupportedParameters from foundry.models.property_v2 import PropertyV2 from foundry.models.put_schema_permission_denied import PutSchemaPermissionDenied from foundry.models.query_aggregation_key_type import QueryAggregationKeyType @@ -369,9 +307,7 @@ from foundry.models.read_table_permission_denied import ReadTablePermissionDenied from foundry.models.release_status import ReleaseStatus from foundry.models.resource_name_already_exists import ResourceNameAlreadyExists -from foundry.models.resource_name_already_exists_parameters import ( - ResourceNameAlreadyExistsParameters, -) +from foundry.models.resource_name_already_exists_parameters import ResourceNameAlreadyExistsParameters from foundry.models.return_edits_mode import ReturnEditsMode from foundry.models.schema_not_found import SchemaNotFound from foundry.models.short_type import ShortType diff --git a/foundry/models/abort_transaction_permission_denied.py b/foundry/models/abort_transaction_permission_denied.py index 9b3ebe1a5..04ac84c7e 100644 --- a/foundry/models/abort_transaction_permission_denied.py +++ b/foundry/models/abort_transaction_permission_denied.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) +from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters from typing_extensions import Self - class AbortTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to abort the given treansaction on the given dataset. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/abort_transaction_permission_denied_parameters.py b/foundry/models/abort_transaction_permission_denied_parameters.py index 89968491b..b3c1de6a5 100644 --- a/foundry/models/abort_transaction_permission_denied_parameters.py +++ b/foundry/models/abort_transaction_permission_denied_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class AbortTransactionPermissionDeniedParameters(BaseModel): """ AbortTransactionPermissionDeniedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_contains_duplicate_edits.py b/foundry/models/action_contains_duplicate_edits.py index a891efb5e..72e48a5d5 100644 --- a/foundry/models/action_contains_duplicate_edits.py +++ b/foundry/models/action_contains_duplicate_edits.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ActionContainsDuplicateEdits(BaseModel): """ The given action request has multiple edits on the same object. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_edited_properties_not_found.py b/foundry/models/action_edited_properties_not_found.py index 2c39dd26d..dfd15689d 100644 --- a/foundry/models/action_edited_properties_not_found.py +++ b/foundry/models/action_edited_properties_not_found.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ActionEditedPropertiesNotFound(BaseModel): """ - Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. - """ # noqa: E501 - + Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_not_found.py b/foundry/models/action_not_found.py index 8ceec7a04..ecbc351e0 100644 --- a/foundry/models/action_not_found.py +++ b/foundry/models/action_not_found.py @@ -38,28 +38,29 @@ from foundry.models.action_not_found_parameters import ActionNotFoundParameters from typing_extensions import Self - class ActionNotFound(BaseModel): """ The action is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_not_found_parameters.py b/foundry/models/action_not_found_parameters.py index 1d9dbea66..6bf1a6546 100644 --- a/foundry/models/action_not_found_parameters.py +++ b/foundry/models/action_not_found_parameters.py @@ -37,18 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ActionNotFoundParameters(BaseModel): """ ActionNotFoundParameters - """ # noqa: E501 - - action_rid: StrictStr = Field( - description="The unique resource identifier for an action.", alias="actionRid" - ) + """ # noqa: E501 + action_rid: StrictStr = Field(description="The unique resource identifier for an action.", alias="actionRid") __properties: ClassVar[Set[str]] = set(("actionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -90,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_parameter_object_not_found.py b/foundry/models/action_parameter_object_not_found.py index 91bcb8568..8ccafdf10 100644 --- a/foundry/models/action_parameter_object_not_found.py +++ b/foundry/models/action_parameter_object_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) +from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters from typing_extensions import Self - class ActionParameterObjectNotFound(BaseModel): """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 - + The parameter object reference or parameter default value is not found, or the client token does not have access to it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_parameter_object_not_found_parameters.py b/foundry/models/action_parameter_object_not_found_parameters.py index 2c239aca5..5a08af5e9 100644 --- a/foundry/models/action_parameter_object_not_found_parameters.py +++ b/foundry/models/action_parameter_object_not_found_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ActionParameterObjectNotFoundParameters(BaseModel): """ ActionParameterObjectNotFoundParameters - """ # noqa: E501 - - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) + """ # noqa: E501 + parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") __properties: ClassVar[Set[str]] = set(("parameterId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_parameter_object_type_not_found.py b/foundry/models/action_parameter_object_type_not_found.py index a45b5f511..4ebd1900b 100644 --- a/foundry/models/action_parameter_object_type_not_found.py +++ b/foundry/models/action_parameter_object_type_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) +from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters from typing_extensions import Self - class ActionParameterObjectTypeNotFound(BaseModel): """ - The parameter references an object type that could not be found, or the client token does not have access to it. - """ # noqa: E501 - + The parameter references an object type that could not be found, or the client token does not have access to it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_parameter_type.py b/foundry/models/action_parameter_type.py index 4382384ba..d3047d036 100644 --- a/foundry/models/action_parameter_type.py +++ b/foundry/models/action_parameter_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -58,13 +57,17 @@ class ActionParameterArrayType(BaseModel): """ ActionParameterArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ActionParameterType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,12 +95,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -109,15 +113,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ActionParameterArrayType.model_rebuild(raise_errors=False) @@ -125,22 +128,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Action parameters. """ -ActionParameterType = Annotated[ - Union[ - ActionParameterArrayType, - AttachmentType, - BooleanType, - DateType, - DoubleType, - IntegerType, - LongType, - OntologyObjectSetType, - OntologyObjectType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +ActionParameterType = Annotated[Union[ActionParameterArrayType, AttachmentType, BooleanType, DateType, DoubleType, IntegerType, LongType, OntologyObjectSetType, OntologyObjectType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/action_parameter_v2.py b/foundry/models/action_parameter_v2.py index a8cf43560..fd2e2b039 100644 --- a/foundry/models/action_parameter_v2.py +++ b/foundry/models/action_parameter_v2.py @@ -38,18 +38,21 @@ from foundry.models.action_parameter_type import ActionParameterType from typing_extensions import Self - class ActionParameterV2(BaseModel): """ Details about a parameter of an action. - """ # noqa: E501 - + """ # noqa: E501 data_type: ActionParameterType = Field(alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("dataType", "description", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -94,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type.py b/foundry/models/action_type.py index 1a2ae8b78..2dea4d907 100644 --- a/foundry/models/action_type.py +++ b/foundry/models/action_type.py @@ -40,31 +40,25 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ActionType(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field( - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " - ) + rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -101,14 +96,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict["operations"] = _items + _dict['operations'] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -120,10 +115,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type_not_found.py b/foundry/models/action_type_not_found.py index bf51a0561..b4758ff0f 100644 --- a/foundry/models/action_type_not_found.py +++ b/foundry/models/action_type_not_found.py @@ -38,28 +38,29 @@ from foundry.models.action_type_not_found_parameters import ActionTypeNotFoundParameters from typing_extensions import Self - class ActionTypeNotFound(BaseModel): """ The action type is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type_not_found_parameters.py b/foundry/models/action_type_not_found_parameters.py index 454b740d3..490b32272 100644 --- a/foundry/models/action_type_not_found_parameters.py +++ b/foundry/models/action_type_not_found_parameters.py @@ -37,24 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ActionTypeNotFoundParameters(BaseModel): """ ActionTypeNotFoundParameters - """ # noqa: E501 - - action_type: Optional[StrictStr] = Field( - default=None, - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ", - ) + """ # noqa: E501 + action_type: Optional[StrictStr] = Field(default=None, description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") + rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") __properties: ClassVar[Set[str]] = set(("actionType", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type_v2.py b/foundry/models/action_type_v2.py index e3aa44e3e..89dc9d56b 100644 --- a/foundry/models/action_type_v2.py +++ b/foundry/models/action_type_v2.py @@ -40,31 +40,25 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ActionTypeV2(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, ActionParameterV2]] = None - rid: StrictStr = Field( - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " - ) + rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -101,14 +96,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict["operations"] = _items + _dict['operations'] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -120,10 +115,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_validation_failed.py b/foundry/models/action_validation_failed.py index 29a6353e1..4f1a47b20 100644 --- a/foundry/models/action_validation_failed.py +++ b/foundry/models/action_validation_failed.py @@ -38,28 +38,29 @@ from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters from typing_extensions import Self - class ActionValidationFailed(BaseModel): """ - The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. - """ # noqa: E501 - + The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionValidationFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_validation_failed_parameters.py b/foundry/models/action_validation_failed_parameters.py index e8aad9946..e18182acf 100644 --- a/foundry/models/action_validation_failed_parameters.py +++ b/foundry/models/action_validation_failed_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ActionValidationFailedParameters(BaseModel): """ ActionValidationFailedParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) + """ # noqa: E501 + action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") __properties: ClassVar[Set[str]] = set(("actionType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/aggregation_group_count_exceeded_limit.py b/foundry/models/aggregation_group_count_exceeded_limit.py index 625d67d1a..83f316a45 100644 --- a/foundry/models/aggregation_group_count_exceeded_limit.py +++ b/foundry/models/aggregation_group_count_exceeded_limit.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( - AggregationGroupCountExceededLimitParameters, -) +from foundry.models.aggregation_group_count_exceeded_limit_parameters import AggregationGroupCountExceededLimitParameters from typing_extensions import Self - class AggregationGroupCountExceededLimit(BaseModel): """ - The number of groups in the aggregations grouping exceeded the allowed limit. - """ # noqa: E501 - + The number of groups in the aggregations grouping exceeded the allowed limit. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AggregationGroupCountExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py b/foundry/models/aggregation_group_count_exceeded_limit_parameters.py index ae15bd296..29ad862d2 100644 --- a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py +++ b/foundry/models/aggregation_group_count_exceeded_limit_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class AggregationGroupCountExceededLimitParameters(BaseModel): """ AggregationGroupCountExceededLimitParameters - """ # noqa: E501 - + """ # noqa: E501 groups_count: StrictInt = Field(alias="groupsCount") groups_limit: StrictInt = Field(alias="groupsLimit") __properties: ClassVar[Set[str]] = set(("groupsCount", "groupsLimit")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/any_type.py b/foundry/models/any_type.py index ce427655c..10570a86e 100644 --- a/foundry/models/any_type.py +++ b/foundry/models/any_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class AnyType(BaseModel): """ AnyType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["any"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/api_feature_preview_usage_only.py b/foundry/models/api_feature_preview_usage_only.py index ccf7e5597..b52b8944f 100644 --- a/foundry/models/api_feature_preview_usage_only.py +++ b/foundry/models/api_feature_preview_usage_only.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ApiFeaturePreviewUsageOnly(BaseModel): """ - This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. - """ # noqa: E501 - + This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/api_usage_denied.py b/foundry/models/api_usage_denied.py index 6e15bc1ba..41b9e35e0 100644 --- a/foundry/models/api_usage_denied.py +++ b/foundry/models/api_usage_denied.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ApiUsageDenied(BaseModel): """ You are not allowed to use Palantir APIs. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/apply_action_failed.py b/foundry/models/apply_action_failed.py index 5cb2926d2..0664190d4 100644 --- a/foundry/models/apply_action_failed.py +++ b/foundry/models/apply_action_failed.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ApplyActionFailed(BaseModel): """ ApplyActionFailed - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/apply_action_mode.py b/foundry/models/apply_action_mode.py index fd8b9a240..f75ceee5c 100644 --- a/foundry/models/apply_action_mode.py +++ b/foundry/models/apply_action_mode.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,10 +48,12 @@ class ApplyActionMode(str, Enum): """ allowed enum values """ - VALIDATE_ONLY = "VALIDATE_ONLY" - VALIDATE_AND_EXECUTE = "VALIDATE_AND_EXECUTE" + VALIDATE_ONLY = 'VALIDATE_ONLY' + VALIDATE_AND_EXECUTE = 'VALIDATE_AND_EXECUTE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ApplyActionMode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/apply_action_request_options.py b/foundry/models/apply_action_request_options.py index 48985b8ed..1544e6e44 100644 --- a/foundry/models/apply_action_request_options.py +++ b/foundry/models/apply_action_request_options.py @@ -39,17 +39,20 @@ from foundry.models.return_edits_mode import ReturnEditsMode from typing_extensions import Self - class ApplyActionRequestOptions(BaseModel): """ ApplyActionRequestOptions - """ # noqa: E501 - + """ # noqa: E501 mode: Optional[ApplyActionMode] = None return_edits: Optional[ReturnEditsMode] = Field(default=None, alias="returnEdits") __properties: ClassVar[Set[str]] = set(("mode", "returnEdits")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/async_operation_error.py b/foundry/models/async_operation_error.py index 74402d49d..14580ba7e 100644 --- a/foundry/models/async_operation_error.py +++ b/foundry/models/async_operation_error.py @@ -37,22 +37,23 @@ from pydantic import Field from typing_extensions import Self - class AsyncOperationError(BaseModel): """ AsyncOperationError - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Optional[Dict[str, Any]] = None type: StrictStr - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters", "type") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters", "type")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -94,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/attachment_not_found.py b/foundry/models/attachment_not_found.py index 5860ea802..0bf4028d1 100644 --- a/foundry/models/attachment_not_found.py +++ b/foundry/models/attachment_not_found.py @@ -38,28 +38,29 @@ from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters from typing_extensions import Self - class AttachmentNotFound(BaseModel): """ - The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. - """ # noqa: E501 - + The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AttachmentNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/attachment_not_found_parameters.py b/foundry/models/attachment_not_found_parameters.py index 7a5c75897..756e0b36b 100644 --- a/foundry/models/attachment_not_found_parameters.py +++ b/foundry/models/attachment_not_found_parameters.py @@ -37,20 +37,19 @@ from pydantic import Field from typing_extensions import Self - class AttachmentNotFoundParameters(BaseModel): """ AttachmentNotFoundParameters - """ # noqa: E501 - - attachment_rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an attachment.", - alias="attachmentRid", - ) + """ # noqa: E501 + attachment_rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an attachment.", alias="attachmentRid") __properties: ClassVar[Set[str]] = set(("attachmentRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/attachment_size_exceeded_limit.py b/foundry/models/attachment_size_exceeded_limit.py index 75fcdf86f..e74683d53 100644 --- a/foundry/models/attachment_size_exceeded_limit.py +++ b/foundry/models/attachment_size_exceeded_limit.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.attachment_size_exceeded_limit_parameters import ( - AttachmentSizeExceededLimitParameters, -) +from foundry.models.attachment_size_exceeded_limit_parameters import AttachmentSizeExceededLimitParameters from typing_extensions import Self - class AttachmentSizeExceededLimit(BaseModel): """ - The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. - """ # noqa: E501 - + The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AttachmentSizeExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/attachment_size_exceeded_limit_parameters.py b/foundry/models/attachment_size_exceeded_limit_parameters.py index ec02b6093..9970f6ff9 100644 --- a/foundry/models/attachment_size_exceeded_limit_parameters.py +++ b/foundry/models/attachment_size_exceeded_limit_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class AttachmentSizeExceededLimitParameters(BaseModel): """ AttachmentSizeExceededLimitParameters - """ # noqa: E501 - + """ # noqa: E501 file_limit_bytes: StrictStr = Field(alias="fileLimitBytes") file_size_bytes: StrictStr = Field(alias="fileSizeBytes") __properties: ClassVar[Set[str]] = set(("fileLimitBytes", "fileSizeBytes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/attachment_type.py b/foundry/models/attachment_type.py index cbbc0ae12..a04411be2 100644 --- a/foundry/models/attachment_type.py +++ b/foundry/models/attachment_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class AttachmentType(BaseModel): """ AttachmentType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["attachment"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/binary_type.py b/foundry/models/binary_type.py index d888061ee..5a37e1fbb 100644 --- a/foundry/models/binary_type.py +++ b/foundry/models/binary_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class BinaryType(BaseModel): """ BinaryType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["binary"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/boolean_type.py b/foundry/models/boolean_type.py index dd8f859e1..75696aa62 100644 --- a/foundry/models/boolean_type.py +++ b/foundry/models/boolean_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class BooleanType(BaseModel): """ BooleanType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["boolean"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch.py b/foundry/models/branch.py index 0f9602f90..d41fcc346 100644 --- a/foundry/models/branch.py +++ b/foundry/models/branch.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class Branch(BaseModel): """ - A Branch of a Dataset. - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + A Branch of a Dataset. + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch_already_exists.py b/foundry/models/branch_already_exists.py index 3efa70292..7d2120a82 100644 --- a/foundry/models/branch_already_exists.py +++ b/foundry/models/branch_already_exists.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class BranchAlreadyExists(BaseModel): """ The branch cannot be created because a branch with that name already exists. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch_already_exists_parameters.py b/foundry/models/branch_already_exists_parameters.py index 10ac0dd0a..5fa3b70bb 100644 --- a/foundry/models/branch_already_exists_parameters.py +++ b/foundry/models/branch_already_exists_parameters.py @@ -37,22 +37,20 @@ from pydantic import Field from typing_extensions import Self - class BranchAlreadyExistsParameters(BaseModel): """ BranchAlreadyExistsParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -94,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch_not_found.py b/foundry/models/branch_not_found.py index c03116508..f5fa7994e 100644 --- a/foundry/models/branch_not_found.py +++ b/foundry/models/branch_not_found.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class BranchNotFound(BaseModel): """ The requested branch could not be found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/byte_type.py b/foundry/models/byte_type.py index badc2ce42..cec878ca5 100644 --- a/foundry/models/byte_type.py +++ b/foundry/models/byte_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class ByteType(BaseModel): """ ByteType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["byte"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/column_types_not_supported.py b/foundry/models/column_types_not_supported.py index b9ccf6936..800d42c6e 100644 --- a/foundry/models/column_types_not_supported.py +++ b/foundry/models/column_types_not_supported.py @@ -38,28 +38,29 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self - class ColumnTypesNotSupported(BaseModel): """ The dataset contains column types that are not supported. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/column_types_not_supported_parameters.py b/foundry/models/column_types_not_supported_parameters.py index f57ddc868..267288334 100644 --- a/foundry/models/column_types_not_supported_parameters.py +++ b/foundry/models/column_types_not_supported_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ColumnTypesNotSupportedParameters(BaseModel): """ ColumnTypesNotSupportedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") __properties: ClassVar[Set[str]] = set(("datasetRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/commit_transaction_permission_denied.py b/foundry/models/commit_transaction_permission_denied.py index 08b57adc6..6c382b446 100644 --- a/foundry/models/commit_transaction_permission_denied.py +++ b/foundry/models/commit_transaction_permission_denied.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) +from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters from typing_extensions import Self - class CommitTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to commit the given treansaction on the given dataset. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/composite_primary_key_not_supported.py b/foundry/models/composite_primary_key_not_supported.py index 4f74a5d32..cb0ee1e2f 100644 --- a/foundry/models/composite_primary_key_not_supported.py +++ b/foundry/models/composite_primary_key_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.composite_primary_key_not_supported_parameters import ( - CompositePrimaryKeyNotSupportedParameters, -) +from foundry.models.composite_primary_key_not_supported_parameters import CompositePrimaryKeyNotSupportedParameters from typing_extensions import Self - class CompositePrimaryKeyNotSupported(BaseModel): """ - Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - + Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: CompositePrimaryKeyNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/composite_primary_key_not_supported_parameters.py b/foundry/models/composite_primary_key_not_supported_parameters.py index 3a3326fcc..b862858eb 100644 --- a/foundry/models/composite_primary_key_not_supported_parameters.py +++ b/foundry/models/composite_primary_key_not_supported_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CompositePrimaryKeyNotSupportedParameters(BaseModel): """ CompositePrimaryKeyNotSupportedParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") primary_key: Optional[List[StrictStr]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_branch_permission_denied.py b/foundry/models/create_branch_permission_denied.py index 7d9b31ddf..e8221fe9f 100644 --- a/foundry/models/create_branch_permission_denied.py +++ b/foundry/models/create_branch_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class CreateBranchPermissionDenied(BaseModel): """ The provided token does not have permission to create a branch of this dataset. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_branch_request.py b/foundry/models/create_branch_request.py index 6f7623934..52b191af8 100644 --- a/foundry/models/create_branch_request.py +++ b/foundry/models/create_branch_request.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateBranchRequest(BaseModel): """ CreateBranchRequest - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_dataset_permission_denied.py b/foundry/models/create_dataset_permission_denied.py index 2039003ab..afedc58b3 100644 --- a/foundry/models/create_dataset_permission_denied.py +++ b/foundry/models/create_dataset_permission_denied.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.create_dataset_permission_denied_parameters import ( - CreateDatasetPermissionDeniedParameters, -) +from foundry.models.create_dataset_permission_denied_parameters import CreateDatasetPermissionDeniedParameters from typing_extensions import Self - class CreateDatasetPermissionDenied(BaseModel): """ The provided token does not have permission to create a dataset in this folder. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: CreateDatasetPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_dataset_permission_denied_parameters.py b/foundry/models/create_dataset_permission_denied_parameters.py index 8e2b85ef2..36c902075 100644 --- a/foundry/models/create_dataset_permission_denied_parameters.py +++ b/foundry/models/create_dataset_permission_denied_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateDatasetPermissionDeniedParameters(BaseModel): """ CreateDatasetPermissionDeniedParameters - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_dataset_request.py b/foundry/models/create_dataset_request.py index 0bf237dba..d3cf06cf4 100644 --- a/foundry/models/create_dataset_request.py +++ b/foundry/models/create_dataset_request.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateDatasetRequest(BaseModel): """ CreateDatasetRequest - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_link_rule.py b/foundry/models/create_link_rule.py index fd8a583bc..1f9a47132 100644 --- a/foundry/models/create_link_rule.py +++ b/foundry/models/create_link_rule.py @@ -37,40 +37,23 @@ from pydantic import Field from typing_extensions import Self - class CreateLinkRule(BaseModel): """ CreateLinkRule - """ # noqa: E501 - - a_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="aSideObjectTypeApiName", - ) - b_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="bSideObjectTypeApiName", - ) - link_type_api_name_ato_b: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameAtoB", - ) - link_type_api_name_bto_a: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameBtoA", - ) + """ # noqa: E501 + a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") + b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") + link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") + link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") type: Literal["createLink"] - __properties: ClassVar[Set[str]] = set( - ( - "aSideObjectTypeApiName", - "bSideObjectTypeApiName", - "linkTypeApiNameAtoB", - "linkTypeApiNameBtoA", - "type", - ) - ) + __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -98,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -112,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_object_rule.py b/foundry/models/create_object_rule.py index c919864c2..e8a7d0d60 100644 --- a/foundry/models/create_object_rule.py +++ b/foundry/models/create_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateObjectRule(BaseModel): """ CreateObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["createObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_transaction_permission_denied.py b/foundry/models/create_transaction_permission_denied.py index 13c4e42c0..7e684a6db 100644 --- a/foundry/models/create_transaction_permission_denied.py +++ b/foundry/models/create_transaction_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class CreateTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to create a transaction on this dataset. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_transaction_request.py b/foundry/models/create_transaction_request.py index 0cc10b315..26017acdd 100644 --- a/foundry/models/create_transaction_request.py +++ b/foundry/models/create_transaction_request.py @@ -38,16 +38,19 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self - class CreateTransactionRequest(BaseModel): """ CreateTransactionRequest - """ # noqa: E501 - + """ # noqa: E501 transaction_type: Optional[TransactionType] = Field(default=None, alias="transactionType") __properties: ClassVar[Set[str]] = set(("transactionType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/dataset.py b/foundry/models/dataset.py index c1dcdc38a..288d147f1 100644 --- a/foundry/models/dataset.py +++ b/foundry/models/dataset.py @@ -37,20 +37,21 @@ from pydantic import Field from typing_extensions import Self - class Dataset(BaseModel): """ Dataset - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. " - ) + rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/dataset_not_found.py b/foundry/models/dataset_not_found.py index 8e6486693..55cb89b09 100644 --- a/foundry/models/dataset_not_found.py +++ b/foundry/models/dataset_not_found.py @@ -38,28 +38,29 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self - class DatasetNotFound(BaseModel): """ The requested dataset could not be found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/date_type.py b/foundry/models/date_type.py index 1bbdd31db..e8abd589e 100644 --- a/foundry/models/date_type.py +++ b/foundry/models/date_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class DateType(BaseModel): """ DateType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["date"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/decimal_type.py b/foundry/models/decimal_type.py index 34aae5518..d8f60d6b4 100644 --- a/foundry/models/decimal_type.py +++ b/foundry/models/decimal_type.py @@ -36,18 +36,21 @@ from pydantic import BaseModel, StrictInt, StrictStr from typing_extensions import Self - class DecimalType(BaseModel): """ DecimalType - """ # noqa: E501 - + """ # noqa: E501 precision: Optional[StrictInt] = None scale: Optional[StrictInt] = None type: Literal["decimal"] __properties: ClassVar[Set[str]] = set(("precision", "scale", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_branch_permission_denied.py b/foundry/models/delete_branch_permission_denied.py index a34182ff1..0832324a6 100644 --- a/foundry/models/delete_branch_permission_denied.py +++ b/foundry/models/delete_branch_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class DeleteBranchPermissionDenied(BaseModel): """ The provided token does not have permission to delete the given branch from this dataset. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_link_rule.py b/foundry/models/delete_link_rule.py index 6aec5cbd3..f0e9c0e93 100644 --- a/foundry/models/delete_link_rule.py +++ b/foundry/models/delete_link_rule.py @@ -37,40 +37,23 @@ from pydantic import Field from typing_extensions import Self - class DeleteLinkRule(BaseModel): """ DeleteLinkRule - """ # noqa: E501 - - a_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="aSideObjectTypeApiName", - ) - b_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="bSideObjectTypeApiName", - ) - link_type_api_name_ato_b: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameAtoB", - ) - link_type_api_name_bto_a: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameBtoA", - ) + """ # noqa: E501 + a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") + b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") + link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") + link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") type: Literal["deleteLink"] - __properties: ClassVar[Set[str]] = set( - ( - "aSideObjectTypeApiName", - "bSideObjectTypeApiName", - "linkTypeApiNameAtoB", - "linkTypeApiNameBtoA", - "type", - ) - ) + __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -98,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -112,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_object_rule.py b/foundry/models/delete_object_rule.py index fe26fc3ad..f5cb7d5c6 100644 --- a/foundry/models/delete_object_rule.py +++ b/foundry/models/delete_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class DeleteObjectRule(BaseModel): """ DeleteObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["deleteObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_schema_permission_denied.py b/foundry/models/delete_schema_permission_denied.py index 58c4ee9f7..621eadd23 100644 --- a/foundry/models/delete_schema_permission_denied.py +++ b/foundry/models/delete_schema_permission_denied.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) +from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters from typing_extensions import Self - class DeleteSchemaPermissionDenied(BaseModel): """ todo - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_schema_permission_denied_parameters.py b/foundry/models/delete_schema_permission_denied_parameters.py index d26476e56..af146165a 100644 --- a/foundry/models/delete_schema_permission_denied_parameters.py +++ b/foundry/models/delete_schema_permission_denied_parameters.py @@ -37,27 +37,21 @@ from pydantic import Field from typing_extensions import Self - class DeleteSchemaPermissionDeniedParameters(BaseModel): """ DeleteSchemaPermissionDeniedParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -99,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_api.py b/foundry/models/deployment_api.py index 776d26b5f..b055aa824 100644 --- a/foundry/models/deployment_api.py +++ b/foundry/models/deployment_api.py @@ -37,16 +37,19 @@ from foundry.models.deployment_transform_api import DeploymentTransformApi from typing_extensions import Self - class DeploymentApi(BaseModel): """ DeploymentApi - """ # noqa: E501 - + """ # noqa: E501 transform: Optional[DeploymentTransformApi] = None __properties: ClassVar[Set[str]] = set(("transform")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,12 +77,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of transform if self.transform: - _dict["transform"] = self.transform.to_dict() + _dict['transform'] = self.transform.to_dict() return _dict @classmethod @@ -91,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_listing.py b/foundry/models/deployment_listing.py index 0b9104f0f..5ab91945d 100644 --- a/foundry/models/deployment_listing.py +++ b/foundry/models/deployment_listing.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class DeploymentListing(BaseModel): """ - Name and description associated with a model deployment. - """ # noqa: E501 - + Name and description associated with a model deployment. + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field( - default=None, - description="A description or explanation of what this model deployment does and is intended to be used for. ", - ) + description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") __properties: ClassVar[Set[str]] = set(("apiName", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_metadata.py b/foundry/models/deployment_metadata.py index fd9aa9f5b..e44bf62a6 100644 --- a/foundry/models/deployment_metadata.py +++ b/foundry/models/deployment_metadata.py @@ -38,21 +38,21 @@ from foundry.models.deployment_api import DeploymentApi from typing_extensions import Self - class DeploymentMetadata(BaseModel): """ - Metadata related to a model deployment. - """ # noqa: E501 - + Metadata related to a model deployment. + """ # noqa: E501 api: DeploymentApi api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field( - default=None, - description="A description or explanation of what this model deployment does and is intended to be used for. ", - ) + description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") __properties: ClassVar[Set[str]] = set(("api", "apiName", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of api if self.api: - _dict["api"] = self.api.to_dict() + _dict['api'] = self.api.to_dict() return _dict @classmethod @@ -97,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_not_available.py b/foundry/models/deployment_not_available.py index 660e9f308..b792a079f 100644 --- a/foundry/models/deployment_not_available.py +++ b/foundry/models/deployment_not_available.py @@ -38,28 +38,29 @@ from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters from typing_extensions import Self - class DeploymentNotAvailable(BaseModel): """ The requested model deployment does not have a model deployed. It may be disabled or failed. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INTERNAL"): + if value not in ('INTERNAL'): raise ValueError("must be one of enum values ('INTERNAL')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_not_available_parameters.py b/foundry/models/deployment_not_available_parameters.py index da3af960d..0423fe3a5 100644 --- a/foundry/models/deployment_not_available_parameters.py +++ b/foundry/models/deployment_not_available_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class DeploymentNotAvailableParameters(BaseModel): """ DeploymentNotAvailableParameters - """ # noqa: E501 - + """ # noqa: E501 deployment_api_name: Optional[StrictStr] = Field(default=None, alias="deploymentApiName") ontology_api_name: Optional[StrictStr] = Field(default=None, alias="ontologyApiName") __properties: ClassVar[Set[str]] = set(("deploymentApiName", "ontologyApiName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_not_found.py b/foundry/models/deployment_not_found.py index 3b96a2ba6..10337a6a7 100644 --- a/foundry/models/deployment_not_found.py +++ b/foundry/models/deployment_not_found.py @@ -38,28 +38,29 @@ from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters from typing_extensions import Self - class DeploymentNotFound(BaseModel): """ The requested model deployment is not found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_transform_api.py b/foundry/models/deployment_transform_api.py index 513847265..120aa6c4a 100644 --- a/foundry/models/deployment_transform_api.py +++ b/foundry/models/deployment_transform_api.py @@ -37,17 +37,20 @@ from foundry.models.model_api_data_type import ModelApiDataType from typing_extensions import Self - class DeploymentTransformApi(BaseModel): """ DeploymentTransformApi - """ # noqa: E501 - + """ # noqa: E501 inputs: Optional[List[ModelApiDataType]] = None outputs: Optional[List[ModelApiDataType]] = None __properties: ClassVar[Set[str]] = set(("inputs", "outputs")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) @@ -84,14 +88,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict["inputs"] = _items + _dict['inputs'] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict["outputs"] = _items + _dict['outputs'] = _items return _dict @classmethod @@ -103,10 +107,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/distance_unit.py b/foundry/models/distance_unit.py index b4ecca5eb..2a7f32c38 100644 --- a/foundry/models/distance_unit.py +++ b/foundry/models/distance_unit.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,17 +48,19 @@ class DistanceUnit(str, Enum): """ allowed enum values """ - MILLIMETERS = "MILLIMETERS" - CENTIMETERS = "CENTIMETERS" - METERS = "METERS" - KILOMETERS = "KILOMETERS" - INCHES = "INCHES" - FEET = "FEET" - YARDS = "YARDS" - MILES = "MILES" - NAUTICAL_MILES = "NAUTICAL_MILES" + MILLIMETERS = 'MILLIMETERS' + CENTIMETERS = 'CENTIMETERS' + METERS = 'METERS' + KILOMETERS = 'KILOMETERS' + INCHES = 'INCHES' + FEET = 'FEET' + YARDS = 'YARDS' + MILES = 'MILES' + NAUTICAL_MILES = 'NAUTICAL_MILES' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DistanceUnit from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/double_type.py b/foundry/models/double_type.py index e21985eea..4587f19a0 100644 --- a/foundry/models/double_type.py +++ b/foundry/models/double_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class DoubleType(BaseModel): """ DoubleType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["double"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/duplicate_order_by.py b/foundry/models/duplicate_order_by.py index 7a2d230ca..7ca5e2313 100644 --- a/foundry/models/duplicate_order_by.py +++ b/foundry/models/duplicate_order_by.py @@ -38,28 +38,29 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self - class DuplicateOrderBy(BaseModel): """ The requested sort order includes duplicate properties. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/duplicate_order_by_parameters.py b/foundry/models/duplicate_order_by_parameters.py index 17379dc39..8b52ca00a 100644 --- a/foundry/models/duplicate_order_by_parameters.py +++ b/foundry/models/duplicate_order_by_parameters.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class DuplicateOrderByParameters(BaseModel): """ DuplicateOrderByParameters - """ # noqa: E501 - + """ # noqa: E501 properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("properties")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/edit_object_permission_denied.py b/foundry/models/edit_object_permission_denied.py index eaadf3947..af80e13c6 100644 --- a/foundry/models/edit_object_permission_denied.py +++ b/foundry/models/edit_object_permission_denied.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class EditObjectPermissionDenied(BaseModel): """ - The user does not have permission to edit this `ObjectType`. - """ # noqa: E501 - + The user does not have permission to edit this `ObjectType`. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file.py b/foundry/models/file.py index 916489615..c0cd32d99 100644 --- a/foundry/models/file.py +++ b/foundry/models/file.py @@ -37,24 +37,22 @@ from pydantic import Field from typing_extensions import Self - class File(BaseModel): """ File - """ # noqa: E501 - - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) + """ # noqa: E501 + path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") size_bytes: Optional[StrictStr] = Field(default=None, alias="sizeBytes") - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") updated_time: datetime = Field(alias="updatedTime") __properties: ClassVar[Set[str]] = set(("path", "sizeBytes", "transactionRid", "updatedTime")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_already_exists.py b/foundry/models/file_already_exists.py index fb959ec25..353974c3e 100644 --- a/foundry/models/file_already_exists.py +++ b/foundry/models/file_already_exists.py @@ -38,28 +38,29 @@ from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters from typing_extensions import Self - class FileAlreadyExists(BaseModel): """ The given file path already exists in the dataset and transaction. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_already_exists_parameters.py b/foundry/models/file_already_exists_parameters.py index 10d369996..e21ed993c 100644 --- a/foundry/models/file_already_exists_parameters.py +++ b/foundry/models/file_already_exists_parameters.py @@ -37,26 +37,21 @@ from pydantic import Field from typing_extensions import Self - class FileAlreadyExistsParameters(BaseModel): """ FileAlreadyExistsParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("datasetRid", "path", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -98,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_not_found_on_branch.py b/foundry/models/file_not_found_on_branch.py index a0f9169f1..335a1e07b 100644 --- a/foundry/models/file_not_found_on_branch.py +++ b/foundry/models/file_not_found_on_branch.py @@ -38,28 +38,29 @@ from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters from typing_extensions import Self - class FileNotFoundOnBranch(BaseModel): """ The requested file could not be found on the given branch, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileNotFoundOnBranchParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_not_found_on_branch_parameters.py b/foundry/models/file_not_found_on_branch_parameters.py index 024f93200..8957eff20 100644 --- a/foundry/models/file_not_found_on_branch_parameters.py +++ b/foundry/models/file_not_found_on_branch_parameters.py @@ -37,25 +37,21 @@ from pydantic import Field from typing_extensions import Self - class FileNotFoundOnBranchParameters(BaseModel): """ FileNotFoundOnBranchParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "path")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -97,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_not_found_on_transaction_range.py b/foundry/models/file_not_found_on_transaction_range.py index c95454870..c7b9180a7 100644 --- a/foundry/models/file_not_found_on_transaction_range.py +++ b/foundry/models/file_not_found_on_transaction_range.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.file_not_found_on_transaction_range_parameters import ( - FileNotFoundOnTransactionRangeParameters, -) +from foundry.models.file_not_found_on_transaction_range_parameters import FileNotFoundOnTransactionRangeParameters from typing_extensions import Self - class FileNotFoundOnTransactionRange(BaseModel): """ The requested file could not be found on the given transaction range, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileNotFoundOnTransactionRangeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_not_found_on_transaction_range_parameters.py b/foundry/models/file_not_found_on_transaction_range_parameters.py index 7a9fb4715..b9eb115c9 100644 --- a/foundry/models/file_not_found_on_transaction_range_parameters.py +++ b/foundry/models/file_not_found_on_transaction_range_parameters.py @@ -37,33 +37,22 @@ from pydantic import Field from typing_extensions import Self - class FileNotFoundOnTransactionRangeParameters(BaseModel): """ FileNotFoundOnTransactionRangeParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - end_transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="endTransactionRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) - start_transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="startTransactionRid", - ) - __properties: ClassVar[Set[str]] = set( - ("datasetRid", "endTransactionRid", "path", "startTransactionRid") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + end_transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="endTransactionRid") + path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") + start_transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="startTransactionRid") + __properties: ClassVar[Set[str]] = set(("datasetRid", "endTransactionRid", "path", "startTransactionRid")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/float_type.py b/foundry/models/float_type.py index 3313f6848..adf518340 100644 --- a/foundry/models/float_type.py +++ b/foundry/models/float_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class FloatType(BaseModel): """ FloatType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["float"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/folder_not_found.py b/foundry/models/folder_not_found.py index f8abb6129..65201d068 100644 --- a/foundry/models/folder_not_found.py +++ b/foundry/models/folder_not_found.py @@ -38,28 +38,29 @@ from foundry.models.folder_not_found_parameters import FolderNotFoundParameters from typing_extensions import Self - class FolderNotFound(BaseModel): """ The requested folder could not be found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FolderNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/folder_not_found_parameters.py b/foundry/models/folder_not_found_parameters.py index 860693282..daadb09de 100644 --- a/foundry/models/folder_not_found_parameters.py +++ b/foundry/models/folder_not_found_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class FolderNotFoundParameters(BaseModel): """ FolderNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 folder_rid: StrictStr = Field(alias="folderRid") __properties: ClassVar[Set[str]] = set(("folderRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_encountered_user_facing_error.py b/foundry/models/function_encountered_user_facing_error.py index 50076d8e4..49e6bdd7b 100644 --- a/foundry/models/function_encountered_user_facing_error.py +++ b/foundry/models/function_encountered_user_facing_error.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) +from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters from typing_extensions import Self - class FunctionEncounteredUserFacingError(BaseModel): """ - The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 - + The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_encountered_user_facing_error_parameters.py b/foundry/models/function_encountered_user_facing_error_parameters.py index 6f5303fff..605cf96cc 100644 --- a/foundry/models/function_encountered_user_facing_error_parameters.py +++ b/foundry/models/function_encountered_user_facing_error_parameters.py @@ -37,24 +37,21 @@ from pydantic import Field from typing_extensions import Self - class FunctionEncounteredUserFacingErrorParameters(BaseModel): """ FunctionEncounteredUserFacingErrorParameters - """ # noqa: E501 - - function_rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", - alias="functionRid", - ) - function_version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", - alias="functionVersion", - ) + """ # noqa: E501 + function_rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", alias="functionRid") + function_version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", alias="functionVersion") message: StrictStr __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion", "message")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_execution_failed.py b/foundry/models/function_execution_failed.py index cb8c810b2..026cf0100 100644 --- a/foundry/models/function_execution_failed.py +++ b/foundry/models/function_execution_failed.py @@ -38,28 +38,29 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self - class FunctionExecutionFailed(BaseModel): """ FunctionExecutionFailed - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_execution_failed_parameters.py b/foundry/models/function_execution_failed_parameters.py index 769169fb8..b3c9438e7 100644 --- a/foundry/models/function_execution_failed_parameters.py +++ b/foundry/models/function_execution_failed_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class FunctionExecutionFailedParameters(BaseModel): """ FunctionExecutionFailedParameters - """ # noqa: E501 - - function_rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", - alias="functionRid", - ) - function_version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", - alias="functionVersion", - ) + """ # noqa: E501 + function_rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", alias="functionRid") + function_version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", alias="functionVersion") __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_execution_timed_out.py b/foundry/models/function_execution_timed_out.py index e76a3c19d..0e4d98c15 100644 --- a/foundry/models/function_execution_timed_out.py +++ b/foundry/models/function_execution_timed_out.py @@ -38,28 +38,29 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self - class FunctionExecutionTimedOut(BaseModel): """ FunctionExecutionTimedOut - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("TIMEOUT"): + if value not in ('TIMEOUT'): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/function_invalid_input.py b/foundry/models/function_invalid_input.py index 3d1f3bfaf..5c4e30520 100644 --- a/foundry/models/function_invalid_input.py +++ b/foundry/models/function_invalid_input.py @@ -38,28 +38,29 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self - class FunctionInvalidInput(BaseModel): """ FunctionInvalidInput - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geo_point.py b/foundry/models/geo_point.py index 84d761d0e..64aaa9148 100644 --- a/foundry/models/geo_point.py +++ b/foundry/models/geo_point.py @@ -38,25 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class GeoPoint(BaseModel): """ GeoPoint - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] = Field( - description='GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ' - ) + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)] = Field(description="GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as \"M\") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ") type: Literal["Point"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -98,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geo_point_type.py b/foundry/models/geo_point_type.py index c5becf4c9..46d10da35 100644 --- a/foundry/models/geo_point_type.py +++ b/foundry/models/geo_point_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class GeoPointType(BaseModel): """ GeoPointType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["geopoint"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geo_shape_type.py b/foundry/models/geo_shape_type.py index a75faa14c..d848b9d8d 100644 --- a/foundry/models/geo_shape_type.py +++ b/foundry/models/geo_shape_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class GeoShapeType(BaseModel): """ GeoShapeType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["geoshape"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geometry.py b/foundry/models/geometry.py index 6627faffe..175e23cf4 100644 --- a/foundry/models/geometry.py +++ b/foundry/models/geometry.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -55,18 +54,19 @@ class GeometryCollection(BaseModel): """ - GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) + GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") geometries: Optional[Annotated[List[Geometry], Field(min_length=0)]] = None type: Literal["GeometryCollection"] __properties: ClassVar[Set[str]] = set(("bbox", "geometries", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -94,7 +94,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in geometries (list) @@ -103,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.geometries: if _item: _items.append(_item.to_dict()) - _dict["geometries"] = _items + _dict['geometries'] = _items return _dict @classmethod @@ -115,15 +116,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors GeometryCollection.model_rebuild(raise_errors=False) @@ -131,12 +131,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ Abstract type for all GeoJSon object except Feature and FeatureCollection """ -Geometry = Annotated[ - Union[ - GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon - ], - Field(discriminator="type"), -] +Geometry = Annotated[Union[GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/integer_type.py b/foundry/models/integer_type.py index 6ce6dd4a2..38440b840 100644 --- a/foundry/models/integer_type.py +++ b/foundry/models/integer_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class IntegerType(BaseModel): """ IntegerType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["integer"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_aggregation_range.py b/foundry/models/invalid_aggregation_range.py index ff243ca3f..843363633 100644 --- a/foundry/models/invalid_aggregation_range.py +++ b/foundry/models/invalid_aggregation_range.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class InvalidAggregationRange(BaseModel): """ - Aggregation range should include one lt or lte and one gt or gte. - """ # noqa: E501 - + Aggregation range should include one lt or lte and one gt or gte. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_aggregation_range_property_type.py b/foundry/models/invalid_aggregation_range_property_type.py index fb7d53033..867be5a31 100644 --- a/foundry/models/invalid_aggregation_range_property_type.py +++ b/foundry/models/invalid_aggregation_range_property_type.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) +from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters from typing_extensions import Self - class InvalidAggregationRangePropertyType(BaseModel): """ - Range group by is not supported by property type. - """ # noqa: E501 - + Range group by is not supported by property type. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_aggregation_range_property_type_parameters.py b/foundry/models/invalid_aggregation_range_property_type_parameters.py index 368d0e0e9..318aa1ee1 100644 --- a/foundry/models/invalid_aggregation_range_property_type_parameters.py +++ b/foundry/models/invalid_aggregation_range_property_type_parameters.py @@ -37,27 +37,21 @@ from pydantic import Field from typing_extensions import Self - class InvalidAggregationRangePropertyTypeParameters(BaseModel): """ InvalidAggregationRangePropertyTypeParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) + """ # noqa: E501 + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") __properties: ClassVar[Set[str]] = set(("objectType", "property", "propertyBaseType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -99,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_aggregation_range_value.py b/foundry/models/invalid_aggregation_range_value.py index 358a55662..05b7ed13a 100644 --- a/foundry/models/invalid_aggregation_range_value.py +++ b/foundry/models/invalid_aggregation_range_value.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) +from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters from typing_extensions import Self - class InvalidAggregationRangeValue(BaseModel): """ - Aggregation value does not conform to the expected underlying type. - """ # noqa: E501 - + Aggregation value does not conform to the expected underlying type. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_apply_action_option_combination.py b/foundry/models/invalid_apply_action_option_combination.py index 74149e7f6..10c5580ad 100644 --- a/foundry/models/invalid_apply_action_option_combination.py +++ b/foundry/models/invalid_apply_action_option_combination.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_apply_action_option_combination_parameters import ( - InvalidApplyActionOptionCombinationParameters, -) +from foundry.models.invalid_apply_action_option_combination_parameters import InvalidApplyActionOptionCombinationParameters from typing_extensions import Self - class InvalidApplyActionOptionCombination(BaseModel): """ The given options are individually valid but cannot be used in the given combination. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidApplyActionOptionCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_apply_action_option_combination_parameters.py b/foundry/models/invalid_apply_action_option_combination_parameters.py index 0f1d3ffa6..8794de092 100644 --- a/foundry/models/invalid_apply_action_option_combination_parameters.py +++ b/foundry/models/invalid_apply_action_option_combination_parameters.py @@ -38,18 +38,19 @@ from foundry.models.apply_action_request_options import ApplyActionRequestOptions from typing_extensions import Self - class InvalidApplyActionOptionCombinationParameters(BaseModel): """ InvalidApplyActionOptionCombinationParameters - """ # noqa: E501 - - invalid_combination: Optional[ApplyActionRequestOptions] = Field( - default=None, alias="invalidCombination" - ) + """ # noqa: E501 + invalid_combination: Optional[ApplyActionRequestOptions] = Field(default=None, alias="invalidCombination") __properties: ClassVar[Set[str]] = set(("invalidCombination")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,12 +78,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of invalid_combination if self.invalid_combination: - _dict["invalidCombination"] = self.invalid_combination.to_dict() + _dict['invalidCombination'] = self.invalid_combination.to_dict() return _dict @classmethod @@ -94,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_branch_id.py b/foundry/models/invalid_branch_id.py index 77099becb..1cf300cff 100644 --- a/foundry/models/invalid_branch_id.py +++ b/foundry/models/invalid_branch_id.py @@ -38,28 +38,29 @@ from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters from typing_extensions import Self - class InvalidBranchId(BaseModel): """ The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidBranchIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_branch_id_parameters.py b/foundry/models/invalid_branch_id_parameters.py index 5eb54cdfe..d8e6bd983 100644 --- a/foundry/models/invalid_branch_id_parameters.py +++ b/foundry/models/invalid_branch_id_parameters.py @@ -37,18 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidBranchIdParameters(BaseModel): """ InvalidBranchIdParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") __properties: ClassVar[Set[str]] = set(("branchId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -90,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_content_length.py b/foundry/models/invalid_content_length.py index 9d25acaab..1cce28379 100644 --- a/foundry/models/invalid_content_length.py +++ b/foundry/models/invalid_content_length.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class InvalidContentLength(BaseModel): """ A `Content-Length` header is required for all uploads, but was missing or invalid. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_content_type.py b/foundry/models/invalid_content_type.py index d2e459938..3455d2859 100644 --- a/foundry/models/invalid_content_type.py +++ b/foundry/models/invalid_content_type.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class InvalidContentType(BaseModel): """ - The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. - """ # noqa: E501 - + The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_duration_group_by_property_type.py b/foundry/models/invalid_duration_group_by_property_type.py index 0fae64627..f878bc6f3 100644 --- a/foundry/models/invalid_duration_group_by_property_type.py +++ b/foundry/models/invalid_duration_group_by_property_type.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) +from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters from typing_extensions import Self - class InvalidDurationGroupByPropertyType(BaseModel): """ - Invalid property type for duration groupBy. - """ # noqa: E501 - + Invalid property type for duration groupBy. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_duration_group_by_value.py b/foundry/models/invalid_duration_group_by_value.py index bff8707a7..9fd4faaf9 100644 --- a/foundry/models/invalid_duration_group_by_value.py +++ b/foundry/models/invalid_duration_group_by_value.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class InvalidDurationGroupByValue(BaseModel): """ - Duration groupBy value is invalid. - """ # noqa: E501 - + Duration groupBy value is invalid. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_fields.py b/foundry/models/invalid_fields.py index 1967c9125..adff85a79 100644 --- a/foundry/models/invalid_fields.py +++ b/foundry/models/invalid_fields.py @@ -38,28 +38,29 @@ from foundry.models.invalid_fields_parameters import InvalidFieldsParameters from typing_extensions import Self - class InvalidFields(BaseModel): """ TBD - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidFieldsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_fields_parameters.py b/foundry/models/invalid_fields_parameters.py index 3b7864e7c..0d5882bd1 100644 --- a/foundry/models/invalid_fields_parameters.py +++ b/foundry/models/invalid_fields_parameters.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class InvalidFieldsParameters(BaseModel): """ InvalidFieldsParameters - """ # noqa: E501 - + """ # noqa: E501 properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("properties")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_group_id.py b/foundry/models/invalid_group_id.py index 2216627ed..dd1835d70 100644 --- a/foundry/models/invalid_group_id.py +++ b/foundry/models/invalid_group_id.py @@ -38,28 +38,29 @@ from foundry.models.invalid_group_id_parameters import InvalidGroupIdParameters from typing_extensions import Self - class InvalidGroupId(BaseModel): """ The provided value for a group id must be a UUID. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidGroupIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_group_id_parameters.py b/foundry/models/invalid_group_id_parameters.py index d4d3e24a8..a99d782ba 100644 --- a/foundry/models/invalid_group_id_parameters.py +++ b/foundry/models/invalid_group_id_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidGroupIdParameters(BaseModel): """ InvalidGroupIdParameters - """ # noqa: E501 - + """ # noqa: E501 group_id: StrictStr = Field(alias="groupId") __properties: ClassVar[Set[str]] = set(("groupId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_page_size.py b/foundry/models/invalid_page_size.py index e5d8f9382..6ddccef2c 100644 --- a/foundry/models/invalid_page_size.py +++ b/foundry/models/invalid_page_size.py @@ -38,28 +38,29 @@ from foundry.models.invalid_page_size_parameters import InvalidPageSizeParameters from typing_extensions import Self - class InvalidPageSize(BaseModel): """ The provided page size was zero or negative. Page sizes must be greater than zero. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPageSizeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_page_size_parameters.py b/foundry/models/invalid_page_size_parameters.py index 333e9781d..8572591e9 100644 --- a/foundry/models/invalid_page_size_parameters.py +++ b/foundry/models/invalid_page_size_parameters.py @@ -37,18 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidPageSizeParameters(BaseModel): """ InvalidPageSizeParameters - """ # noqa: E501 - - page_size: StrictInt = Field( - description="The page size to use for the endpoint.", alias="pageSize" - ) + """ # noqa: E501 + page_size: StrictInt = Field(description="The page size to use for the endpoint.", alias="pageSize") __properties: ClassVar[Set[str]] = set(("pageSize")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -90,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_page_token.py b/foundry/models/invalid_page_token.py index dd1379125..24551b141 100644 --- a/foundry/models/invalid_page_token.py +++ b/foundry/models/invalid_page_token.py @@ -38,28 +38,29 @@ from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters from typing_extensions import Self - class InvalidPageToken(BaseModel): """ The provided page token could not be used to retrieve the next page of results. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPageTokenParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_page_token_parameters.py b/foundry/models/invalid_page_token_parameters.py index cddf43ace..ae51ddd6d 100644 --- a/foundry/models/invalid_page_token_parameters.py +++ b/foundry/models/invalid_page_token_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidPageTokenParameters(BaseModel): """ InvalidPageTokenParameters - """ # noqa: E501 - - page_token: StrictStr = Field( - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="pageToken", - ) + """ # noqa: E501 + page_token: StrictStr = Field(description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="pageToken") __properties: ClassVar[Set[str]] = set(("pageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_parameter_combination.py b/foundry/models/invalid_parameter_combination.py index 04114118e..4af2b45a6 100644 --- a/foundry/models/invalid_parameter_combination.py +++ b/foundry/models/invalid_parameter_combination.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_parameter_combination_parameters import ( - InvalidParameterCombinationParameters, -) +from foundry.models.invalid_parameter_combination_parameters import InvalidParameterCombinationParameters from typing_extensions import Self - class InvalidParameterCombination(BaseModel): """ The given parameters are individually valid but cannot be used in the given combination. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidParameterCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_parameter_combination_parameters.py b/foundry/models/invalid_parameter_combination_parameters.py index 1251ee3ba..b7755a678 100644 --- a/foundry/models/invalid_parameter_combination_parameters.py +++ b/foundry/models/invalid_parameter_combination_parameters.py @@ -37,19 +37,20 @@ from pydantic import Field from typing_extensions import Self - class InvalidParameterCombinationParameters(BaseModel): """ InvalidParameterCombinationParameters - """ # noqa: E501 - + """ # noqa: E501 provided_parameters: Optional[List[StrictStr]] = Field(default=None, alias="providedParameters") - valid_combinations: Optional[List[List[StrictStr]]] = Field( - default=None, alias="validCombinations" - ) + valid_combinations: Optional[List[List[StrictStr]]] = Field(default=None, alias="validCombinations") __properties: ClassVar[Set[str]] = set(("providedParameters", "validCombinations")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_parameter_value.py b/foundry/models/invalid_parameter_value.py index 75c84c8c2..872955c40 100644 --- a/foundry/models/invalid_parameter_value.py +++ b/foundry/models/invalid_parameter_value.py @@ -38,28 +38,29 @@ from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters from typing_extensions import Self - class InvalidParameterValue(BaseModel): """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 - + The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidParameterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_parameter_value_parameters.py b/foundry/models/invalid_parameter_value_parameters.py index 9c7bc62ea..e48dd1bce 100644 --- a/foundry/models/invalid_parameter_value_parameters.py +++ b/foundry/models/invalid_parameter_value_parameters.py @@ -38,32 +38,22 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self - class InvalidParameterValueParameters(BaseModel): """ InvalidParameterValueParameters - """ # noqa: E501 - - parameter_base_type: Optional[StrictStr] = Field( - default=None, - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="parameterBaseType", - ) + """ # noqa: E501 + parameter_base_type: Optional[StrictStr] = Field(default=None, description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="parameterBaseType") parameter_data_type: Optional[OntologyDataType] = Field(default=None, alias="parameterDataType") - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - parameter_value: Optional[Any] = Field( - default=None, - description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="parameterValue", - ) - __properties: ClassVar[Set[str]] = set( - ("parameterBaseType", "parameterDataType", "parameterId", "parameterValue") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") + parameter_value: Optional[Any] = Field(default=None, description="Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | string | `\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `\"EMP1234\"` | | Set | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Struct | JSON object | `{\"name\": \"John Doe\", \"age\": 42}` | | TwoDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"NYC\", \"groups\": [{\"key\": \"Engineer\", \"value\" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="parameterValue") + __properties: ClassVar[Set[str]] = set(("parameterBaseType", "parameterDataType", "parameterId", "parameterValue")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,16 +81,17 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameter_data_type if self.parameter_data_type: - _dict["parameterDataType"] = self.parameter_data_type.to_dict() + _dict['parameterDataType'] = self.parameter_data_type.to_dict() # set to None if parameter_value (nullable) is None # and model_fields_set contains the field if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict["parameterValue"] = None + _dict['parameterValue'] = None return _dict @@ -113,10 +104,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_filter_value.py b/foundry/models/invalid_property_filter_value.py index ab6167a84..cfcd9cad9 100644 --- a/foundry/models/invalid_property_filter_value.py +++ b/foundry/models/invalid_property_filter_value.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filter_value_parameters import ( - InvalidPropertyFilterValueParameters, -) +from foundry.models.invalid_property_filter_value_parameters import InvalidPropertyFilterValueParameters from typing_extensions import Self - class InvalidPropertyFilterValue(BaseModel): """ - The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - """ # noqa: E501 - + The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFilterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_filter_value_parameters.py b/foundry/models/invalid_property_filter_value_parameters.py index b1a888290..41009f375 100644 --- a/foundry/models/invalid_property_filter_value_parameters.py +++ b/foundry/models/invalid_property_filter_value_parameters.py @@ -37,33 +37,22 @@ from pydantic import Field from typing_extensions import Self - class InvalidPropertyFilterValueParameters(BaseModel): """ InvalidPropertyFilterValueParameters - """ # noqa: E501 - - expected_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="expectedType", - ) - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_filter: StrictStr = Field( - description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', - alias="propertyFilter", - ) - property_filter_value: StrictStr = Field( - description="Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. ", - alias="propertyFilterValue", - ) - __properties: ClassVar[Set[str]] = set( - ("expectedType", "property", "propertyFilter", "propertyFilterValue") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + """ # noqa: E501 + expected_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="expectedType") + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + property_filter: StrictStr = Field(description="Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ", alias="propertyFilter") + property_filter_value: StrictStr = Field(description="Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. ", alias="propertyFilterValue") + __properties: ClassVar[Set[str]] = set(("expectedType", "property", "propertyFilter", "propertyFilterValue")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_filters_combination.py b/foundry/models/invalid_property_filters_combination.py index 682490f3e..80f10af77 100644 --- a/foundry/models/invalid_property_filters_combination.py +++ b/foundry/models/invalid_property_filters_combination.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) +from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters from typing_extensions import Self - class InvalidPropertyFiltersCombination(BaseModel): """ The provided filters cannot be used together. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_filters_combination_parameters.py b/foundry/models/invalid_property_filters_combination_parameters.py index 90d8fb411..2c6c6f8b6 100644 --- a/foundry/models/invalid_property_filters_combination_parameters.py +++ b/foundry/models/invalid_property_filters_combination_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class InvalidPropertyFiltersCombinationParameters(BaseModel): """ InvalidPropertyFiltersCombinationParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) + """ # noqa: E501 + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") property_filters: Optional[List[StrictStr]] = Field(default=None, alias="propertyFilters") __properties: ClassVar[Set[str]] = set(("property", "propertyFilters")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_type.py b/foundry/models/invalid_property_type.py index 1ae77a83a..e11beea84 100644 --- a/foundry/models/invalid_property_type.py +++ b/foundry/models/invalid_property_type.py @@ -38,28 +38,29 @@ from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters from typing_extensions import Self - class InvalidPropertyType(BaseModel): """ - The given property type is not of the expected type. - """ # noqa: E501 - + The given property type is not of the expected type. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_type_parameters.py b/foundry/models/invalid_property_type_parameters.py index 8637e8f47..955a705e5 100644 --- a/foundry/models/invalid_property_type_parameters.py +++ b/foundry/models/invalid_property_type_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class InvalidPropertyTypeParameters(BaseModel): """ InvalidPropertyTypeParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) + """ # noqa: E501 + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_value.py b/foundry/models/invalid_property_value.py index 16e16b0a8..6d45911bc 100644 --- a/foundry/models/invalid_property_value.py +++ b/foundry/models/invalid_property_value.py @@ -38,28 +38,29 @@ from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters from typing_extensions import Self - class InvalidPropertyValue(BaseModel): """ - The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. - """ # noqa: E501 - + The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_property_value_parameters.py b/foundry/models/invalid_property_value_parameters.py index 5abae0b81..40548240d 100644 --- a/foundry/models/invalid_property_value_parameters.py +++ b/foundry/models/invalid_property_value_parameters.py @@ -37,27 +37,21 @@ from pydantic import Field from typing_extensions import Self - class InvalidPropertyValueParameters(BaseModel): """ InvalidPropertyValueParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - property_value: Optional[Any] = Field( - description='Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Double | number | `3.14159265` | | Float | number | `3.14159265` | | GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | | GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="propertyValue", - ) + """ # noqa: E501 + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") + property_value: Optional[Any] = Field(description="Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | JSON encoded `AttachmentProperty` object | `{\"rid\":\"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"}` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Double | number | `3.14159265` | | Float | number | `3.14159265` | | GeoPoint | geojson | `{\"type\":\"Point\",\"coordinates\":[102.0,0.5]}` | | GeoShape | geojson | `{\"type\":\"LineString\",\"coordinates\":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="propertyValue") __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType", "propertyValue")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,13 +79,14 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # set to None if property_value (nullable) is None # and model_fields_set contains the field if self.property_value is None and "property_value" in self.model_fields_set: - _dict["propertyValue"] = None + _dict['propertyValue'] = None return _dict @@ -104,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_query_parameter_value.py b/foundry/models/invalid_query_parameter_value.py index 4bca54e40..054b30e90 100644 --- a/foundry/models/invalid_query_parameter_value.py +++ b/foundry/models/invalid_query_parameter_value.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_query_parameter_value_parameters import ( - InvalidQueryParameterValueParameters, -) +from foundry.models.invalid_query_parameter_value_parameters import InvalidQueryParameterValueParameters from typing_extensions import Self - class InvalidQueryParameterValue(BaseModel): """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 - + The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidQueryParameterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_query_parameter_value_parameters.py b/foundry/models/invalid_query_parameter_value_parameters.py index e73dde6c9..4258cf391 100644 --- a/foundry/models/invalid_query_parameter_value_parameters.py +++ b/foundry/models/invalid_query_parameter_value_parameters.py @@ -38,25 +38,21 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self - class InvalidQueryParameterValueParameters(BaseModel): """ InvalidQueryParameterValueParameters - """ # noqa: E501 - + """ # noqa: E501 parameter_data_type: QueryDataType = Field(alias="parameterDataType") - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - parameter_value: Optional[Any] = Field( - default=None, - description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="parameterValue", - ) + parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") + parameter_value: Optional[Any] = Field(default=None, description="Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | string | `\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `\"EMP1234\"` | | Set | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Struct | JSON object | `{\"name\": \"John Doe\", \"age\": 42}` | | TwoDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"NYC\", \"groups\": [{\"key\": \"Engineer\", \"value\" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="parameterValue") __properties: ClassVar[Set[str]] = set(("parameterDataType", "parameterId", "parameterValue")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,16 +80,17 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameter_data_type if self.parameter_data_type: - _dict["parameterDataType"] = self.parameter_data_type.to_dict() + _dict['parameterDataType'] = self.parameter_data_type.to_dict() # set to None if parameter_value (nullable) is None # and model_fields_set contains the field if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict["parameterValue"] = None + _dict['parameterValue'] = None return _dict @@ -106,10 +103,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_range_query.py b/foundry/models/invalid_range_query.py index 878fafb39..b2cb1d060 100644 --- a/foundry/models/invalid_range_query.py +++ b/foundry/models/invalid_range_query.py @@ -38,28 +38,29 @@ from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters from typing_extensions import Self - class InvalidRangeQuery(BaseModel): """ - The specified query range filter is invalid. - """ # noqa: E501 - + The specified query range filter is invalid. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidRangeQueryParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_range_query_parameters.py b/foundry/models/invalid_range_query_parameters.py index f8b6d3b15..3d1ea2258 100644 --- a/foundry/models/invalid_range_query_parameters.py +++ b/foundry/models/invalid_range_query_parameters.py @@ -37,12 +37,10 @@ from pydantic import Field from typing_extensions import Self - class InvalidRangeQueryParameters(BaseModel): """ InvalidRangeQueryParameters - """ # noqa: E501 - + """ # noqa: E501 field: StrictStr gt: Optional[Any] = Field(default=None, description="Greater than") gte: Optional[Any] = Field(default=None, description="Greater than or equal") @@ -50,7 +48,12 @@ class InvalidRangeQueryParameters(BaseModel): lte: Optional[Any] = Field(default=None, description="Less than or equal") __properties: ClassVar[Set[str]] = set(("field", "gt", "gte", "lt", "lte")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,28 +81,29 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # set to None if gt (nullable) is None # and model_fields_set contains the field if self.gt is None and "gt" in self.model_fields_set: - _dict["gt"] = None + _dict['gt'] = None # set to None if gte (nullable) is None # and model_fields_set contains the field if self.gte is None and "gte" in self.model_fields_set: - _dict["gte"] = None + _dict['gte'] = None # set to None if lt (nullable) is None # and model_fields_set contains the field if self.lt is None and "lt" in self.model_fields_set: - _dict["lt"] = None + _dict['lt'] = None # set to None if lte (nullable) is None # and model_fields_set contains the field if self.lte is None and "lte" in self.model_fields_set: - _dict["lte"] = None + _dict['lte'] = None return _dict @@ -112,10 +116,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_sort_order.py b/foundry/models/invalid_sort_order.py index e1a4f2f8c..57be82062 100644 --- a/foundry/models/invalid_sort_order.py +++ b/foundry/models/invalid_sort_order.py @@ -38,28 +38,29 @@ from foundry.models.invalid_sort_order_parameters import InvalidSortOrderParameters from typing_extensions import Self - class InvalidSortOrder(BaseModel): """ - The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. - """ # noqa: E501 - + The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidSortOrderParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_sort_order_parameters.py b/foundry/models/invalid_sort_order_parameters.py index db39f0761..676bd53d9 100644 --- a/foundry/models/invalid_sort_order_parameters.py +++ b/foundry/models/invalid_sort_order_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidSortOrderParameters(BaseModel): """ InvalidSortOrderParameters - """ # noqa: E501 - + """ # noqa: E501 invalid_sort_order: StrictStr = Field(alias="invalidSortOrder") __properties: ClassVar[Set[str]] = set(("invalidSortOrder")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_sort_type.py b/foundry/models/invalid_sort_type.py index b6095826f..826231c8e 100644 --- a/foundry/models/invalid_sort_type.py +++ b/foundry/models/invalid_sort_type.py @@ -38,28 +38,29 @@ from foundry.models.invalid_sort_type_parameters import InvalidSortTypeParameters from typing_extensions import Self - class InvalidSortType(BaseModel): """ The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidSortTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_sort_type_parameters.py b/foundry/models/invalid_sort_type_parameters.py index 09e94fc86..c102115bb 100644 --- a/foundry/models/invalid_sort_type_parameters.py +++ b/foundry/models/invalid_sort_type_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidSortTypeParameters(BaseModel): """ InvalidSortTypeParameters - """ # noqa: E501 - + """ # noqa: E501 invalid_sort_type: StrictStr = Field(alias="invalidSortType") __properties: ClassVar[Set[str]] = set(("invalidSortType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_transaction_type.py b/foundry/models/invalid_transaction_type.py index 3e104906e..99069d828 100644 --- a/foundry/models/invalid_transaction_type.py +++ b/foundry/models/invalid_transaction_type.py @@ -38,28 +38,29 @@ from foundry.models.invalid_transaction_type_parameters import InvalidTransactionTypeParameters from typing_extensions import Self - class InvalidTransactionType(BaseModel): """ The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidTransactionTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_transaction_type_parameters.py b/foundry/models/invalid_transaction_type_parameters.py index 572d862aa..4c92d6861 100644 --- a/foundry/models/invalid_transaction_type_parameters.py +++ b/foundry/models/invalid_transaction_type_parameters.py @@ -38,24 +38,21 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self - class InvalidTransactionTypeParameters(BaseModel): """ InvalidTransactionTypeParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") transaction_type: TransactionType = Field(alias="transactionType") __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -97,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_user_id.py b/foundry/models/invalid_user_id.py index ce14408be..73b503a08 100644 --- a/foundry/models/invalid_user_id.py +++ b/foundry/models/invalid_user_id.py @@ -38,28 +38,29 @@ from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters from typing_extensions import Self - class InvalidUserId(BaseModel): """ The provided value for a user id must be a UUID. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidUserIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_user_id_parameters.py b/foundry/models/invalid_user_id_parameters.py index 546bb942b..f24455213 100644 --- a/foundry/models/invalid_user_id_parameters.py +++ b/foundry/models/invalid_user_id_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class InvalidUserIdParameters(BaseModel): """ InvalidUserIdParameters - """ # noqa: E501 - + """ # noqa: E501 user_id: StrictStr = Field(alias="userId") __properties: ClassVar[Set[str]] = set(("userId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/language_model_source.py b/foundry/models/language_model_source.py index 616e2d62d..d4ca40ebe 100644 --- a/foundry/models/language_model_source.py +++ b/foundry/models/language_model_source.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,10 +48,12 @@ class LanguageModelSource(str, Enum): """ allowed enum values """ - GLOBAL = "global" - HOSTED = "hosted" + GLOBAL = 'global' + HOSTED = 'hosted' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LanguageModelSource from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/language_model_source_not_supported.py b/foundry/models/language_model_source_not_supported.py index b92e0ba7d..723713ffd 100644 --- a/foundry/models/language_model_source_not_supported.py +++ b/foundry/models/language_model_source_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.language_model_source_not_supported_parameters import ( - LanguageModelSourceNotSupportedParameters, -) +from foundry.models.language_model_source_not_supported_parameters import LanguageModelSourceNotSupportedParameters from typing_extensions import Self - class LanguageModelSourceNotSupported(BaseModel): """ LanguageModelSourceNotSupported - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LanguageModelSourceNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/language_model_source_not_supported_parameters.py b/foundry/models/language_model_source_not_supported_parameters.py index f41860701..a9cbccd2f 100644 --- a/foundry/models/language_model_source_not_supported_parameters.py +++ b/foundry/models/language_model_source_not_supported_parameters.py @@ -37,16 +37,19 @@ from foundry.models.language_model_source import LanguageModelSource from typing_extensions import Self - class LanguageModelSourceNotSupportedParameters(BaseModel): """ LanguageModelSourceNotSupportedParameters - """ # noqa: E501 - + """ # noqa: E501 source: LanguageModelSource __properties: ClassVar[Set[str]] = set(("source")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/line_string.py b/foundry/models/line_string.py index 058a3caa6..b0648ddf4 100644 --- a/foundry/models/line_string.py +++ b/foundry/models/line_string.py @@ -38,29 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class LineString(BaseModel): """ LineString - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - Annotated[ - List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], - Field(min_length=2), - ] - ] = Field( - default=None, - description="GeoJSon fundamental geometry construct, array of two or more positions. ", - ) + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]] = Field(default=None, description="GeoJSon fundamental geometry construct, array of two or more positions. ") type: Literal["LineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -102,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_already_exists.py b/foundry/models/link_already_exists.py index c0be880f6..53812204a 100644 --- a/foundry/models/link_already_exists.py +++ b/foundry/models/link_already_exists.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class LinkAlreadyExists(BaseModel): """ - The link the user is attempting to create already exists. - """ # noqa: E501 - + The link the user is attempting to create already exists. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_type_not_found.py b/foundry/models/link_type_not_found.py index 4efbfa7e7..e8417a2a1 100644 --- a/foundry/models/link_type_not_found.py +++ b/foundry/models/link_type_not_found.py @@ -38,28 +38,29 @@ from foundry.models.link_type_not_found_parameters import LinkTypeNotFoundParameters from typing_extensions import Self - class LinkTypeNotFound(BaseModel): """ The link type is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LinkTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_type_not_found_parameters.py b/foundry/models/link_type_not_found_parameters.py index 492460ebd..24bed4041 100644 --- a/foundry/models/link_type_not_found_parameters.py +++ b/foundry/models/link_type_not_found_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class LinkTypeNotFoundParameters(BaseModel): """ LinkTypeNotFoundParameters - """ # noqa: E501 - - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") __properties: ClassVar[Set[str]] = set(("linkType", "objectType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_type_side.py b/foundry/models/link_type_side.py index 976573715..2ef43e8d0 100644 --- a/foundry/models/link_type_side.py +++ b/foundry/models/link_type_side.py @@ -39,42 +39,24 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class LinkTypeSide(BaseModel): """ LinkTypeSide - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - foreign_key_property_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="foreignKeyPropertyApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "cardinality", - "displayName", - "foreignKeyPropertyApiName", - "objectTypeApiName", - "status", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -116,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_type_side_cardinality.py b/foundry/models/link_type_side_cardinality.py index 54188958b..bf74fc408 100644 --- a/foundry/models/link_type_side_cardinality.py +++ b/foundry/models/link_type_side_cardinality.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,10 +48,12 @@ class LinkTypeSideCardinality(str, Enum): """ allowed enum values """ - ONE = "ONE" - MANY = "MANY" + ONE = 'ONE' + MANY = 'MANY' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LinkTypeSideCardinality from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/link_type_side_v2.py b/foundry/models/link_type_side_v2.py index f9b964386..5cffe22ba 100644 --- a/foundry/models/link_type_side_v2.py +++ b/foundry/models/link_type_side_v2.py @@ -39,42 +39,24 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class LinkTypeSideV2(BaseModel): """ LinkTypeSideV2 - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - foreign_key_property_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="foreignKeyPropertyApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "cardinality", - "displayName", - "foreignKeyPropertyApiName", - "objectTypeApiName", - "status", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -116,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/linked_object_not_found.py b/foundry/models/linked_object_not_found.py index aa5698483..0f2bf4ce8 100644 --- a/foundry/models/linked_object_not_found.py +++ b/foundry/models/linked_object_not_found.py @@ -38,28 +38,29 @@ from foundry.models.linked_object_not_found_parameters import LinkedObjectNotFoundParameters from typing_extensions import Self - class LinkedObjectNotFound(BaseModel): """ The linked object with the given primary key is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LinkedObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/linked_object_not_found_parameters.py b/foundry/models/linked_object_not_found_parameters.py index 4bfb615a4..cb22690e6 100644 --- a/foundry/models/linked_object_not_found_parameters.py +++ b/foundry/models/linked_object_not_found_parameters.py @@ -37,28 +37,21 @@ from pydantic import Field from typing_extensions import Self - class LinkedObjectNotFoundParameters(BaseModel): """ LinkedObjectNotFoundParameters - """ # noqa: E501 - - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - linked_object_primary_key: Optional[Dict[str, Any]] = Field( - default=None, alias="linkedObjectPrimaryKey" - ) - linked_object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="linkedObjectType", - ) - __properties: ClassVar[Set[str]] = set( - ("linkType", "linkedObjectPrimaryKey", "linkedObjectType") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + """ # noqa: E501 + link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") + linked_object_primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="linkedObjectPrimaryKey") + linked_object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="linkedObjectType") + __properties: ClassVar[Set[str]] = set(("linkType", "linkedObjectPrimaryKey", "linkedObjectType")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_action_types_response.py b/foundry/models/list_action_types_response.py index ddc1154aa..5764c23c5 100644 --- a/foundry/models/list_action_types_response.py +++ b/foundry/models/list_action_types_response.py @@ -38,21 +38,20 @@ from foundry.models.action_type import ActionType from typing_extensions import Self - class ListActionTypesResponse(BaseModel): """ ListActionTypesResponse - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[ActionType]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_action_types_response_v2.py b/foundry/models/list_action_types_response_v2.py index 8ec108e8e..8ade15754 100644 --- a/foundry/models/list_action_types_response_v2.py +++ b/foundry/models/list_action_types_response_v2.py @@ -38,21 +38,20 @@ from foundry.models.action_type_v2 import ActionTypeV2 from typing_extensions import Self - class ListActionTypesResponseV2(BaseModel): """ ListActionTypesResponseV2 - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[ActionTypeV2]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_branches_response.py b/foundry/models/list_branches_response.py index d6e2c905e..3927e363b 100644 --- a/foundry/models/list_branches_response.py +++ b/foundry/models/list_branches_response.py @@ -38,23 +38,20 @@ from foundry.models.branch import Branch from typing_extensions import Self - class ListBranchesResponse(BaseModel): """ ListBranchesResponse - """ # noqa: E501 - - data: Optional[List[Branch]] = Field( - default=None, description="The list of branches in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[Branch]] = Field(default=None, description="The list of branches in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_deployments_response.py b/foundry/models/list_deployments_response.py index 6c2537255..904c04b6f 100644 --- a/foundry/models/list_deployments_response.py +++ b/foundry/models/list_deployments_response.py @@ -37,16 +37,19 @@ from foundry.models.deployment_listing import DeploymentListing from typing_extensions import Self - class ListDeploymentsResponse(BaseModel): """ ListDeploymentsResponse - """ # noqa: E501 - + """ # noqa: E501 deployments: Optional[List[DeploymentListing]] = None __properties: ClassVar[Set[str]] = set(("deployments")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in deployments (list) @@ -83,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.deployments: if _item: _items.append(_item.to_dict()) - _dict["deployments"] = _items + _dict['deployments'] = _items return _dict @classmethod @@ -95,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_files_response.py b/foundry/models/list_files_response.py index 46b45e632..a58b7d14d 100644 --- a/foundry/models/list_files_response.py +++ b/foundry/models/list_files_response.py @@ -38,21 +38,20 @@ from foundry.models.file import File from typing_extensions import Self - class ListFilesResponse(BaseModel): """ A page of Files and an optional page token that can be used to retrieve the next page. - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[File]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_object_types_response.py b/foundry/models/list_object_types_response.py index d07e6618b..f21235de7 100644 --- a/foundry/models/list_object_types_response.py +++ b/foundry/models/list_object_types_response.py @@ -38,23 +38,20 @@ from foundry.models.object_type import ObjectType from typing_extensions import Self - class ListObjectTypesResponse(BaseModel): """ ListObjectTypesResponse - """ # noqa: E501 - - data: Optional[List[ObjectType]] = Field( - default=None, description="The list of object types in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[ObjectType]] = Field(default=None, description="The list of object types in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_object_types_v2_response.py b/foundry/models/list_object_types_v2_response.py index 9e963bb67..361d10991 100644 --- a/foundry/models/list_object_types_v2_response.py +++ b/foundry/models/list_object_types_v2_response.py @@ -38,23 +38,20 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self - class ListObjectTypesV2Response(BaseModel): """ ListObjectTypesV2Response - """ # noqa: E501 - - data: Optional[List[ObjectTypeV2]] = Field( - default=None, description="The list of object types in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[ObjectTypeV2]] = Field(default=None, description="The list of object types in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_ontologies_response.py b/foundry/models/list_ontologies_response.py index 7a83d1e54..5dc17ca14 100644 --- a/foundry/models/list_ontologies_response.py +++ b/foundry/models/list_ontologies_response.py @@ -38,18 +38,19 @@ from foundry.models.ontology import Ontology from typing_extensions import Self - class ListOntologiesResponse(BaseModel): """ ListOntologiesResponse - """ # noqa: E501 - - data: Optional[List[Ontology]] = Field( - default=None, description="The list of Ontologies the user has access to." - ) + """ # noqa: E501 + data: Optional[List[Ontology]] = Field(default=None, description="The list of Ontologies the user has access to.") __properties: ClassVar[Set[str]] = set(("data")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -86,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -98,10 +100,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_ontologies_v2_response.py b/foundry/models/list_ontologies_v2_response.py index 12b880f7c..262395847 100644 --- a/foundry/models/list_ontologies_v2_response.py +++ b/foundry/models/list_ontologies_v2_response.py @@ -38,18 +38,19 @@ from foundry.models.ontology_v2 import OntologyV2 from typing_extensions import Self - class ListOntologiesV2Response(BaseModel): """ ListOntologiesV2Response - """ # noqa: E501 - - data: Optional[List[OntologyV2]] = Field( - default=None, description="The list of Ontologies the user has access to." - ) + """ # noqa: E501 + data: Optional[List[OntologyV2]] = Field(default=None, description="The list of Ontologies the user has access to.") __properties: ClassVar[Set[str]] = set(("data")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -86,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -98,10 +100,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_outgoing_link_types_response.py b/foundry/models/list_outgoing_link_types_response.py index 17e5d4a88..4ac325ce5 100644 --- a/foundry/models/list_outgoing_link_types_response.py +++ b/foundry/models/list_outgoing_link_types_response.py @@ -38,23 +38,20 @@ from foundry.models.link_type_side import LinkTypeSide from typing_extensions import Self - class ListOutgoingLinkTypesResponse(BaseModel): """ ListOutgoingLinkTypesResponse - """ # noqa: E501 - - data: Optional[List[LinkTypeSide]] = Field( - default=None, description="The list of link type sides in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[LinkTypeSide]] = Field(default=None, description="The list of link type sides in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_outgoing_link_types_response_v2.py b/foundry/models/list_outgoing_link_types_response_v2.py index 20abfd54f..d41bcdecf 100644 --- a/foundry/models/list_outgoing_link_types_response_v2.py +++ b/foundry/models/list_outgoing_link_types_response_v2.py @@ -38,23 +38,20 @@ from foundry.models.link_type_side_v2 import LinkTypeSideV2 from typing_extensions import Self - class ListOutgoingLinkTypesResponseV2(BaseModel): """ ListOutgoingLinkTypesResponseV2 - """ # noqa: E501 - - data: Optional[List[LinkTypeSideV2]] = Field( - default=None, description="The list of link type sides in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[LinkTypeSideV2]] = Field(default=None, description="The list of link type sides in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_query_types_response.py b/foundry/models/list_query_types_response.py index e64275770..ff3697f04 100644 --- a/foundry/models/list_query_types_response.py +++ b/foundry/models/list_query_types_response.py @@ -38,21 +38,20 @@ from foundry.models.query_type import QueryType from typing_extensions import Self - class ListQueryTypesResponse(BaseModel): """ ListQueryTypesResponse - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[QueryType]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_query_types_response_v2.py b/foundry/models/list_query_types_response_v2.py index 090d061dd..54c39ce52 100644 --- a/foundry/models/list_query_types_response_v2.py +++ b/foundry/models/list_query_types_response_v2.py @@ -38,21 +38,20 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self - class ListQueryTypesResponseV2(BaseModel): """ ListQueryTypesResponseV2 - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[QueryTypeV2]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/logic_rule.py b/foundry/models/logic_rule.py index 991de14ba..5948cca46 100644 --- a/foundry/models/logic_rule.py +++ b/foundry/models/logic_rule.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -47,13 +46,13 @@ from foundry.models.modify_object_rule import ModifyObjectRule + """ LogicRule """ -LogicRule = Annotated[ - Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], - Field(discriminator="type"), -] +LogicRule = Annotated[Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/long_type.py b/foundry/models/long_type.py index 24dd2e1c2..e2234d664 100644 --- a/foundry/models/long_type.py +++ b/foundry/models/long_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class LongType(BaseModel): """ LongType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["long"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/malformed_property_filters.py b/foundry/models/malformed_property_filters.py index b00ea444d..685101ed3 100644 --- a/foundry/models/malformed_property_filters.py +++ b/foundry/models/malformed_property_filters.py @@ -38,28 +38,29 @@ from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters from typing_extensions import Self - class MalformedPropertyFilters(BaseModel): """ - At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. - """ # noqa: E501 - + At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MalformedPropertyFiltersParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/malformed_property_filters_parameters.py b/foundry/models/malformed_property_filters_parameters.py index 6557a1021..034474d9a 100644 --- a/foundry/models/malformed_property_filters_parameters.py +++ b/foundry/models/malformed_property_filters_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class MalformedPropertyFiltersParameters(BaseModel): """ MalformedPropertyFiltersParameters - """ # noqa: E501 - + """ # noqa: E501 malformed_property_filter: StrictStr = Field(alias="malformedPropertyFilter") __properties: ClassVar[Set[str]] = set(("malformedPropertyFilter")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_action_mapping_not_found.py b/foundry/models/marketplace_action_mapping_not_found.py index 7d0e335d5..c242e1de5 100644 --- a/foundry/models/marketplace_action_mapping_not_found.py +++ b/foundry/models/marketplace_action_mapping_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_action_mapping_not_found_parameters import ( - MarketplaceActionMappingNotFoundParameters, -) +from foundry.models.marketplace_action_mapping_not_found_parameters import MarketplaceActionMappingNotFoundParameters from typing_extensions import Self - class MarketplaceActionMappingNotFound(BaseModel): """ The given action could not be mapped to a Marketplace installation. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceActionMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_action_mapping_not_found_parameters.py b/foundry/models/marketplace_action_mapping_not_found_parameters.py index a2eac26be..4bb52f30d 100644 --- a/foundry/models/marketplace_action_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_action_mapping_not_found_parameters.py @@ -37,21 +37,21 @@ from pydantic import Field from typing_extensions import Self - class MarketplaceActionMappingNotFoundParameters(BaseModel): """ MarketplaceActionMappingNotFoundParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) + """ # noqa: E501 + action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("actionType", "artifactRepository", "packageName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -93,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_installation_not_found.py b/foundry/models/marketplace_installation_not_found.py index 75edc706b..28b1ef821 100644 --- a/foundry/models/marketplace_installation_not_found.py +++ b/foundry/models/marketplace_installation_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_installation_not_found_parameters import ( - MarketplaceInstallationNotFoundParameters, -) +from foundry.models.marketplace_installation_not_found_parameters import MarketplaceInstallationNotFoundParameters from typing_extensions import Self - class MarketplaceInstallationNotFound(BaseModel): """ - The given marketplace installation could not be found or the user does not have access to it. - """ # noqa: E501 - + The given marketplace installation could not be found or the user does not have access to it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceInstallationNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_installation_not_found_parameters.py b/foundry/models/marketplace_installation_not_found_parameters.py index 182713213..011a528b1 100644 --- a/foundry/models/marketplace_installation_not_found_parameters.py +++ b/foundry/models/marketplace_installation_not_found_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class MarketplaceInstallationNotFoundParameters(BaseModel): """ MarketplaceInstallationNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_link_mapping_not_found.py b/foundry/models/marketplace_link_mapping_not_found.py index a7e14c3f7..4ed5796f6 100644 --- a/foundry/models/marketplace_link_mapping_not_found.py +++ b/foundry/models/marketplace_link_mapping_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_link_mapping_not_found_parameters import ( - MarketplaceLinkMappingNotFoundParameters, -) +from foundry.models.marketplace_link_mapping_not_found_parameters import MarketplaceLinkMappingNotFoundParameters from typing_extensions import Self - class MarketplaceLinkMappingNotFound(BaseModel): """ The given link could not be mapped to a Marketplace installation. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceLinkMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_link_mapping_not_found_parameters.py b/foundry/models/marketplace_link_mapping_not_found_parameters.py index aed6ec532..769acd407 100644 --- a/foundry/models/marketplace_link_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_link_mapping_not_found_parameters.py @@ -37,27 +37,22 @@ from pydantic import Field from typing_extensions import Self - class MarketplaceLinkMappingNotFoundParameters(BaseModel): """ MarketplaceLinkMappingNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 artifact_repository: StrictStr = Field(alias="artifactRepository") - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set( - ("artifactRepository", "linkType", "objectType", "packageName") - ) + __properties: ClassVar[Set[str]] = set(("artifactRepository", "linkType", "objectType", "packageName")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -99,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_object_mapping_not_found.py b/foundry/models/marketplace_object_mapping_not_found.py index 5545414bc..83cdb0c47 100644 --- a/foundry/models/marketplace_object_mapping_not_found.py +++ b/foundry/models/marketplace_object_mapping_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_object_mapping_not_found_parameters import ( - MarketplaceObjectMappingNotFoundParameters, -) +from foundry.models.marketplace_object_mapping_not_found_parameters import MarketplaceObjectMappingNotFoundParameters from typing_extensions import Self - class MarketplaceObjectMappingNotFound(BaseModel): """ The given object could not be mapped to a Marketplace installation. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceObjectMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_object_mapping_not_found_parameters.py b/foundry/models/marketplace_object_mapping_not_found_parameters.py index 2a567dd80..ddd93c421 100644 --- a/foundry/models/marketplace_object_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_object_mapping_not_found_parameters.py @@ -37,21 +37,21 @@ from pydantic import Field from typing_extensions import Self - class MarketplaceObjectMappingNotFoundParameters(BaseModel): """ MarketplaceObjectMappingNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 artifact_repository: StrictStr = Field(alias="artifactRepository") - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("artifactRepository", "objectType", "packageName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -93,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_query_mapping_not_found.py b/foundry/models/marketplace_query_mapping_not_found.py index 81c489b37..a6669eb19 100644 --- a/foundry/models/marketplace_query_mapping_not_found.py +++ b/foundry/models/marketplace_query_mapping_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_query_mapping_not_found_parameters import ( - MarketplaceQueryMappingNotFoundParameters, -) +from foundry.models.marketplace_query_mapping_not_found_parameters import MarketplaceQueryMappingNotFoundParameters from typing_extensions import Self - class MarketplaceQueryMappingNotFound(BaseModel): """ The given query could not be mapped to a Marketplace installation. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceQueryMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/marketplace_query_mapping_not_found_parameters.py b/foundry/models/marketplace_query_mapping_not_found_parameters.py index fcb37c35d..db550f324 100644 --- a/foundry/models/marketplace_query_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_query_mapping_not_found_parameters.py @@ -37,20 +37,21 @@ from pydantic import Field from typing_extensions import Self - class MarketplaceQueryMappingNotFoundParameters(BaseModel): """ MarketplaceQueryMappingNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") - query_type: StrictStr = Field( - description="The name of the Query in the API. ", alias="queryType" - ) + query_type: StrictStr = Field(description="The name of the Query in the API. ", alias="queryType") __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName", "queryType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/missing_parameter.py b/foundry/models/missing_parameter.py index 0ce1a8997..97408f417 100644 --- a/foundry/models/missing_parameter.py +++ b/foundry/models/missing_parameter.py @@ -38,28 +38,29 @@ from foundry.models.missing_parameter_parameters import MissingParameterParameters from typing_extensions import Self - class MissingParameter(BaseModel): """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. - """ # noqa: E501 - + Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MissingParameterParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/missing_parameter_parameters.py b/foundry/models/missing_parameter_parameters.py index b52324bbe..96dfc2ec3 100644 --- a/foundry/models/missing_parameter_parameters.py +++ b/foundry/models/missing_parameter_parameters.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class MissingParameterParameters(BaseModel): """ MissingParameterParameters - """ # noqa: E501 - + """ # noqa: E501 parameters: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("parameters")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/missing_post_body.py b/foundry/models/missing_post_body.py index f6ea6020e..33c6bff42 100644 --- a/foundry/models/missing_post_body.py +++ b/foundry/models/missing_post_body.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class MissingPostBody(BaseModel): """ A post body is required for this endpoint, but was not found in the request. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/model_api_data_type.py b/foundry/models/model_api_data_type.py index ee9e829a4..b2fa653d6 100644 --- a/foundry/models/model_api_data_type.py +++ b/foundry/models/model_api_data_type.py @@ -38,18 +38,21 @@ from foundry.models.model_api_type import ModelApiType from typing_extensions import Self - class ModelApiDataType(BaseModel): """ - An object definition representing an input or an output type for the deployment API. - """ # noqa: E501 - + An object definition representing an input or an output type for the deployment API. + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The name of a field. ") property_type: Optional[ModelApiType] = Field(default=None, alias="propertyType") required: Optional[StrictBool] = None __properties: ClassVar[Set[str]] = set(("name", "propertyType", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of property_type if self.property_type: - _dict["propertyType"] = self.property_type.to_dict() + _dict['propertyType'] = self.property_type.to_dict() return _dict @classmethod @@ -94,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/model_api_type.py b/foundry/models/model_api_type.py index 9a25740ed..6adf3b44d 100644 --- a/foundry/models/model_api_type.py +++ b/foundry/models/model_api_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -56,13 +55,17 @@ class ModelApiUnionType(BaseModel): """ ModelApiUnionType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["union"] union_types: Optional[List[ModelApiType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,7 +93,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -99,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict["unionTypes"] = _items + _dict['unionTypes'] = _items return _dict @classmethod @@ -111,29 +115,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiUnionType.model_rebuild(raise_errors=False) - class ModelApiStructField(BaseModel): """ ModelApiStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: ModelApiType = Field(alias="fieldType") name: StrictStr __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -161,12 +167,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -178,29 +185,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiStructField.model_rebuild(raise_errors=False) - class ModelApiStructType(BaseModel): """ ModelApiStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[ModelApiStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -228,7 +237,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -237,7 +247,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -249,30 +259,32 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiStructType.model_rebuild(raise_errors=False) - class ModelApiMapType(BaseModel): """ ModelApiMapType - """ # noqa: E501 - + """ # noqa: E501 key_type: ModelApiType = Field(alias="keyType") type: Literal["map"] value_type: ModelApiType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -300,15 +312,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -320,29 +333,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiMapType.model_rebuild(raise_errors=False) - class ModelApiArrayType(BaseModel): """ ModelApiArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ModelApiType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -370,12 +385,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -387,15 +403,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiArrayType.model_rebuild(raise_errors=False) @@ -403,23 +418,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by models. """ -ModelApiType = Annotated[ - Union[ - AnyType, - BooleanType, - DateType, - FloatType, - IntegerType, - ModelApiArrayType, - ModelApiMapType, - ModelApiStructType, - ModelApiUnionType, - NullType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +ModelApiType = Annotated[Union[AnyType, BooleanType, DateType, FloatType, IntegerType, ModelApiArrayType, ModelApiMapType, ModelApiStructType, ModelApiUnionType, NullType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/model_property.py b/foundry/models/model_property.py index e2c5ba4c6..1d773bf2e 100644 --- a/foundry/models/model_property.py +++ b/foundry/models/model_property.py @@ -37,23 +37,21 @@ from pydantic import Field from typing_extensions import Self - class ModelProperty(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - - base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="baseType", - ) + """ # noqa: E501 + base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") __properties: ClassVar[Set[str]] = set(("baseType", "description", "displayName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/modify_object_rule.py b/foundry/models/modify_object_rule.py index ad80aae8d..9f3331ff3 100644 --- a/foundry/models/modify_object_rule.py +++ b/foundry/models/modify_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ModifyObjectRule(BaseModel): """ ModifyObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["modifyObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_line_string.py b/foundry/models/multi_line_string.py index 0984b4d8d..2fbd194d9 100644 --- a/foundry/models/multi_line_string.py +++ b/foundry/models/multi_line_string.py @@ -38,32 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiLineString(BaseModel): """ MultiLineString - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=2), - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]]] = None type: Literal["MultiLineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_point.py b/foundry/models/multi_point.py index ab905a5ed..31277bba6 100644 --- a/foundry/models/multi_point.py +++ b/foundry/models/multi_point.py @@ -38,23 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiPoint(BaseModel): """ MultiPoint - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]]] = None type: Literal["MultiPoint"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_polygon.py b/foundry/models/multi_polygon.py index e5afbf19e..b336bb887 100644 --- a/foundry/models/multi_polygon.py +++ b/foundry/models/multi_polygon.py @@ -38,34 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiPolygon(BaseModel): """ MultiPolygon - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=4), - ] - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]]] = None type: Literal["MultiPolygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -93,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -107,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multiple_group_by_on_field_not_supported.py b/foundry/models/multiple_group_by_on_field_not_supported.py index 0745693a4..331fad746 100644 --- a/foundry/models/multiple_group_by_on_field_not_supported.py +++ b/foundry/models/multiple_group_by_on_field_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( - MultipleGroupByOnFieldNotSupportedParameters, -) +from foundry.models.multiple_group_by_on_field_not_supported_parameters import MultipleGroupByOnFieldNotSupportedParameters from typing_extensions import Self - class MultipleGroupByOnFieldNotSupported(BaseModel): """ - Aggregation cannot group by on the same field multiple times. - """ # noqa: E501 - + Aggregation cannot group by on the same field multiple times. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MultipleGroupByOnFieldNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py b/foundry/models/multiple_group_by_on_field_not_supported_parameters.py index 107f20aff..880bd5da2 100644 --- a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py +++ b/foundry/models/multiple_group_by_on_field_not_supported_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class MultipleGroupByOnFieldNotSupportedParameters(BaseModel): """ MultipleGroupByOnFieldNotSupportedParameters - """ # noqa: E501 - + """ # noqa: E501 duplicate_fields: Optional[List[StrictStr]] = Field(default=None, alias="duplicateFields") __properties: ClassVar[Set[str]] = set(("duplicateFields")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multiple_property_values_not_supported.py b/foundry/models/multiple_property_values_not_supported.py index 6cd186ffd..659ca088a 100644 --- a/foundry/models/multiple_property_values_not_supported.py +++ b/foundry/models/multiple_property_values_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.multiple_property_values_not_supported_parameters import ( - MultiplePropertyValuesNotSupportedParameters, -) +from foundry.models.multiple_property_values_not_supported_parameters import MultiplePropertyValuesNotSupportedParameters from typing_extensions import Self - class MultiplePropertyValuesNotSupported(BaseModel): """ - One of the requested property filters does not support multiple values. Please include only a single value for it. - """ # noqa: E501 - + One of the requested property filters does not support multiple values. Please include only a single value for it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MultiplePropertyValuesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multiple_property_values_not_supported_parameters.py b/foundry/models/multiple_property_values_not_supported_parameters.py index aef463428..b87533af3 100644 --- a/foundry/models/multiple_property_values_not_supported_parameters.py +++ b/foundry/models/multiple_property_values_not_supported_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class MultiplePropertyValuesNotSupportedParameters(BaseModel): """ MultiplePropertyValuesNotSupportedParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_filter: StrictStr = Field( - description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', - alias="propertyFilter", - ) + """ # noqa: E501 + var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + property_filter: StrictStr = Field(description="Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ", alias="propertyFilter") __properties: ClassVar[Set[str]] = set(("property", "propertyFilter")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/null_type.py b/foundry/models/null_type.py index 4ce134496..c7c4a45f0 100644 --- a/foundry/models/null_type.py +++ b/foundry/models/null_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class NullType(BaseModel): """ NullType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["null"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_already_exists.py b/foundry/models/object_already_exists.py index 284ca285a..396b92fd5 100644 --- a/foundry/models/object_already_exists.py +++ b/foundry/models/object_already_exists.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ObjectAlreadyExists(BaseModel): """ - The object the user is attempting to create already exists. - """ # noqa: E501 - + The object the user is attempting to create already exists. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_changed.py b/foundry/models/object_changed.py index 360aabdfc..c86ca9bad 100644 --- a/foundry/models/object_changed.py +++ b/foundry/models/object_changed.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ObjectChanged(BaseModel): """ - An object used by this `Action` was changed by someone else while the `Action` was running. - """ # noqa: E501 - + An object used by this `Action` was changed by someone else while the `Action` was running. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_not_found.py b/foundry/models/object_not_found.py index f8111d35b..142f4b2ba 100644 --- a/foundry/models/object_not_found.py +++ b/foundry/models/object_not_found.py @@ -38,28 +38,29 @@ from foundry.models.object_not_found_parameters import ObjectNotFoundParameters from typing_extensions import Self - class ObjectNotFound(BaseModel): """ The requested object is not found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_not_found_parameters.py b/foundry/models/object_not_found_parameters.py index bd1afee52..6a1b401d0 100644 --- a/foundry/models/object_not_found_parameters.py +++ b/foundry/models/object_not_found_parameters.py @@ -37,21 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ObjectNotFoundParameters(BaseModel): """ ObjectNotFoundParameters - """ # noqa: E501 - - object_type: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + object_type: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -93,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_property_type.py b/foundry/models/object_property_type.py index 7313f363b..43d142b5b 100644 --- a/foundry/models/object_property_type.py +++ b/foundry/models/object_property_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -63,13 +62,17 @@ class OntologyObjectArrayType(BaseModel): """ OntologyObjectArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ObjectPropertyType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -97,12 +100,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -114,15 +118,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyObjectArrayType.model_rebuild(raise_errors=False) @@ -130,27 +133,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Object properties. """ -ObjectPropertyType = Annotated[ - Union[ - AttachmentType, - BooleanType, - ByteType, - DateType, - DecimalType, - DoubleType, - FloatType, - GeoPointType, - GeoShapeType, - IntegerType, - LongType, - OntologyObjectArrayType, - ShortType, - StringType, - TimeseriesType, - TimestampType, - ], - Field(discriminator="type"), -] +ObjectPropertyType = Annotated[Union[AttachmentType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, GeoPointType, GeoShapeType, IntegerType, LongType, OntologyObjectArrayType, ShortType, StringType, TimeseriesType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/object_type.py b/foundry/models/object_type.py index f406f6a13..be77397c3 100644 --- a/foundry/models/object_type.py +++ b/foundry/models/object_type.py @@ -40,49 +40,26 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ObjectType(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) - description: Optional[StrictStr] = Field( - default=None, description="The description of the object type." - ) - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) - primary_key: Optional[List[StrictStr]] = Field( - default=None, - description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", - alias="primaryKey", - ) - properties: Optional[Dict[str, ModelProperty]] = Field( - default=None, description="A map of the properties of the object type." - ) - rid: StrictStr = Field( - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") + description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + primary_key: Optional[List[StrictStr]] = Field(default=None, description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", alias="primaryKey") + properties: Optional[Dict[str, ModelProperty]] = Field(default=None, description="A map of the properties of the object type.") + rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "description", - "displayName", - "primaryKey", - "properties", - "rid", - "status", - "visibility", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -110,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -119,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict["properties"] = _field_dict + _dict['properties'] = _field_dict return _dict @classmethod @@ -131,10 +109,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_not_found.py b/foundry/models/object_type_not_found.py index 1aea30d14..5021c67e2 100644 --- a/foundry/models/object_type_not_found.py +++ b/foundry/models/object_type_not_found.py @@ -38,28 +38,29 @@ from foundry.models.object_type_not_found_parameters import ObjectTypeNotFoundParameters from typing_extensions import Self - class ObjectTypeNotFound(BaseModel): """ The requested object type is not found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_not_found_parameters.py b/foundry/models/object_type_not_found_parameters.py index d7544a146..15f02b75e 100644 --- a/foundry/models/object_type_not_found_parameters.py +++ b/foundry/models/object_type_not_found_parameters.py @@ -37,25 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ObjectTypeNotFoundParameters(BaseModel): """ ObjectTypeNotFoundParameters - """ # noqa: E501 - - object_type: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - object_type_rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.", - alias="objectTypeRid", - ) + """ # noqa: E501 + object_type: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + object_type_rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.", alias="objectTypeRid") __properties: ClassVar[Set[str]] = set(("objectType", "objectTypeRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -97,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_not_synced.py b/foundry/models/object_type_not_synced.py index 27c5715c0..bbd7e7fa0 100644 --- a/foundry/models/object_type_not_synced.py +++ b/foundry/models/object_type_not_synced.py @@ -38,28 +38,29 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self - class ObjectTypeNotSynced(BaseModel): """ - The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. - """ # noqa: E501 - + The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_not_synced_parameters.py b/foundry/models/object_type_not_synced_parameters.py index 55e1510dd..0b90146f6 100644 --- a/foundry/models/object_type_not_synced_parameters.py +++ b/foundry/models/object_type_not_synced_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ObjectTypeNotSyncedParameters(BaseModel): """ ObjectTypeNotSyncedParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") __properties: ClassVar[Set[str]] = set(("objectType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -91,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_v2.py b/foundry/models/object_type_v2.py index 73960523d..6d35c1be4 100644 --- a/foundry/models/object_type_v2.py +++ b/foundry/models/object_type_v2.py @@ -40,48 +40,26 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ObjectTypeV2(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) - description: Optional[StrictStr] = Field( - default=None, description="The description of the object type." - ) - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) - primary_key: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="primaryKey", - ) - properties: Optional[Dict[str, PropertyV2]] = Field( - default=None, description="A map of the properties of the object type." - ) - rid: StrictStr = Field( - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") + description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + primary_key: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="primaryKey") + properties: Optional[Dict[str, PropertyV2]] = Field(default=None, description="A map of the properties of the object type.") + rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "description", - "displayName", - "primaryKey", - "properties", - "rid", - "status", - "visibility", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -109,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -118,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict["properties"] = _field_dict + _dict['properties'] = _field_dict return _dict @classmethod @@ -130,10 +109,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_visibility.py b/foundry/models/object_type_visibility.py index 02ba36e24..ca48c1875 100644 --- a/foundry/models/object_type_visibility.py +++ b/foundry/models/object_type_visibility.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,11 +48,13 @@ class ObjectTypeVisibility(str, Enum): """ allowed enum values """ - NORMAL = "NORMAL" - PROMINENT = "PROMINENT" - HIDDEN = "HIDDEN" + NORMAL = 'NORMAL' + PROMINENT = 'PROMINENT' + HIDDEN = 'HIDDEN' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ObjectTypeVisibility from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/object_type_with_link.py b/foundry/models/object_type_with_link.py index 7af2a30dc..79d6e8134 100644 --- a/foundry/models/object_type_with_link.py +++ b/foundry/models/object_type_with_link.py @@ -39,17 +39,20 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self - class ObjectTypeWithLink(BaseModel): """ ObjectTypeWithLink - """ # noqa: E501 - + """ # noqa: E501 link_types: Optional[List[LinkTypeSideV2]] = Field(default=None, alias="linkTypes") object_type: ObjectTypeV2 = Field(alias="objectType") __properties: ClassVar[Set[str]] = set(("linkTypes", "objectType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in link_types (list) @@ -86,10 +90,10 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.link_types: if _item: _items.append(_item.to_dict()) - _dict["linkTypes"] = _items + _dict['linkTypes'] = _items # override the default output from pydantic by calling `to_dict()` of object_type if self.object_type: - _dict["objectType"] = self.object_type.to_dict() + _dict['objectType'] = self.object_type.to_dict() return _dict @classmethod @@ -101,10 +105,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/objects_exceeded_limit.py b/foundry/models/objects_exceeded_limit.py index fd7e0c47a..10aa89163 100644 --- a/foundry/models/objects_exceeded_limit.py +++ b/foundry/models/objects_exceeded_limit.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ObjectsExceededLimit(BaseModel): """ - There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. - """ # noqa: E501 - + There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology.py b/foundry/models/ontology.py index 1715c3703..2a827d4d7 100644 --- a/foundry/models/ontology.py +++ b/foundry/models/ontology.py @@ -37,23 +37,22 @@ from pydantic import Field from typing_extensions import Self - class Ontology(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - rid: StrictStr = Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_data_type.py b/foundry/models/ontology_data_type.py index cf174a385..93c81fbf4 100644 --- a/foundry/models/ontology_data_type.py +++ b/foundry/models/ontology_data_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -64,14 +63,18 @@ class OntologyStructField(BaseModel): """ OntologyStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: OntologyDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") required: StrictBool __properties: ClassVar[Set[str]] = set(("fieldType", "name", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -99,12 +102,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -116,29 +120,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyStructField.model_rebuild(raise_errors=False) - class OntologyStructType(BaseModel): """ OntologyStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[OntologyStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -166,7 +172,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -175,7 +182,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -187,29 +194,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyStructType.model_rebuild(raise_errors=False) - class OntologySetType(BaseModel): """ OntologySetType - """ # noqa: E501 - + """ # noqa: E501 item_type: OntologyDataType = Field(alias="itemType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -237,12 +246,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -254,30 +264,32 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologySetType.model_rebuild(raise_errors=False) - class OntologyMapType(BaseModel): """ OntologyMapType - """ # noqa: E501 - + """ # noqa: E501 key_type: OntologyDataType = Field(alias="keyType") type: Literal["map"] value_type: OntologyDataType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -305,15 +317,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -325,29 +338,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyMapType.model_rebuild(raise_errors=False) - class OntologyArrayType(BaseModel): """ OntologyArrayType - """ # noqa: E501 - + """ # noqa: E501 item_type: OntologyDataType = Field(alias="itemType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -375,12 +390,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -392,15 +408,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyArrayType.model_rebuild(raise_errors=False) @@ -408,31 +423,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the primitive types used by Palantir's Ontology-based products. """ -OntologyDataType = Annotated[ - Union[ - AnyType, - BinaryType, - BooleanType, - ByteType, - DateType, - DecimalType, - DoubleType, - FloatType, - IntegerType, - LongType, - OntologyArrayType, - OntologyMapType, - OntologyObjectSetType, - OntologyObjectType, - OntologySetType, - OntologyStructType, - ShortType, - StringType, - TimestampType, - UnsupportedType, - ], - Field(discriminator="type"), -] +OntologyDataType = Annotated[Union[AnyType, BinaryType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, IntegerType, LongType, OntologyArrayType, OntologyMapType, OntologyObjectSetType, OntologyObjectType, OntologySetType, OntologyStructType, ShortType, StringType, TimestampType, UnsupportedType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/ontology_edits_exceeded_limit.py b/foundry/models/ontology_edits_exceeded_limit.py index 64f6fcc34..4df511cfc 100644 --- a/foundry/models/ontology_edits_exceeded_limit.py +++ b/foundry/models/ontology_edits_exceeded_limit.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.ontology_edits_exceeded_limit_parameters import ( - OntologyEditsExceededLimitParameters, -) +from foundry.models.ontology_edits_exceeded_limit_parameters import OntologyEditsExceededLimitParameters from typing_extensions import Self - class OntologyEditsExceededLimit(BaseModel): """ - The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. - """ # noqa: E501 - + The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OntologyEditsExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_edits_exceeded_limit_parameters.py b/foundry/models/ontology_edits_exceeded_limit_parameters.py index 5f47ef472..fa8727eb6 100644 --- a/foundry/models/ontology_edits_exceeded_limit_parameters.py +++ b/foundry/models/ontology_edits_exceeded_limit_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class OntologyEditsExceededLimitParameters(BaseModel): """ OntologyEditsExceededLimitParameters - """ # noqa: E501 - + """ # noqa: E501 edits_count: StrictInt = Field(alias="editsCount") edits_limit: StrictInt = Field(alias="editsLimit") __properties: ClassVar[Set[str]] = set(("editsCount", "editsLimit")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_full_metadata.py b/foundry/models/ontology_full_metadata.py index 43cd31d51..887cb889e 100644 --- a/foundry/models/ontology_full_metadata.py +++ b/foundry/models/ontology_full_metadata.py @@ -41,19 +41,22 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self - class OntologyFullMetadata(BaseModel): """ OntologyFullMetadata - """ # noqa: E501 - + """ # noqa: E501 action_types: Optional[Dict[str, ActionTypeV2]] = Field(default=None, alias="actionTypes") object_types: Optional[Dict[str, ObjectTypeWithLink]] = Field(default=None, alias="objectTypes") ontology: OntologyV2 query_types: Optional[Dict[str, QueryTypeV2]] = Field(default=None, alias="queryTypes") __properties: ClassVar[Set[str]] = set(("actionTypes", "objectTypes", "ontology", "queryTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in action_types (dict) @@ -90,24 +94,24 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.action_types: if self.action_types[_key]: _field_dict[_key] = self.action_types[_key].to_dict() - _dict["actionTypes"] = _field_dict + _dict['actionTypes'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in object_types (dict) _field_dict = {} if self.object_types: for _key in self.object_types: if self.object_types[_key]: _field_dict[_key] = self.object_types[_key].to_dict() - _dict["objectTypes"] = _field_dict + _dict['objectTypes'] = _field_dict # override the default output from pydantic by calling `to_dict()` of ontology if self.ontology: - _dict["ontology"] = self.ontology.to_dict() + _dict['ontology'] = self.ontology.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in query_types (dict) _field_dict = {} if self.query_types: for _key in self.query_types: if self.query_types[_key]: _field_dict[_key] = self.query_types[_key].to_dict() - _dict["queryTypes"] = _field_dict + _dict['queryTypes'] = _field_dict return _dict @classmethod @@ -119,10 +123,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_not_found.py b/foundry/models/ontology_not_found.py index 7c23356b2..c02aeab17 100644 --- a/foundry/models/ontology_not_found.py +++ b/foundry/models/ontology_not_found.py @@ -38,28 +38,29 @@ from foundry.models.ontology_not_found_parameters import OntologyNotFoundParameters from typing_extensions import Self - class OntologyNotFound(BaseModel): """ The requested Ontology is not found, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OntologyNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_not_found_parameters.py b/foundry/models/ontology_not_found_parameters.py index 0fa763407..002184380 100644 --- a/foundry/models/ontology_not_found_parameters.py +++ b/foundry/models/ontology_not_found_parameters.py @@ -37,21 +37,20 @@ from pydantic import Field from typing_extensions import Self - class OntologyNotFoundParameters(BaseModel): """ OntologyNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 api_name: Optional[StrictStr] = Field(default=None, alias="apiName") - ontology_rid: Optional[StrictStr] = Field( - default=None, - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ", - alias="ontologyRid", - ) + ontology_rid: Optional[StrictStr] = Field(default=None, description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ", alias="ontologyRid") __properties: ClassVar[Set[str]] = set(("apiName", "ontologyRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -93,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_object_set_type.py b/foundry/models/ontology_object_set_type.py index c36bbd127..a81bbc7b1 100644 --- a/foundry/models/ontology_object_set_type.py +++ b/foundry/models/ontology_object_set_type.py @@ -37,26 +37,21 @@ from pydantic import Field from typing_extensions import Self - class OntologyObjectSetType(BaseModel): """ OntologyObjectSetType - """ # noqa: E501 - - object_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectApiName", - ) - object_type_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") + object_type_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["objectSet"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -98,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_object_type.py b/foundry/models/ontology_object_type.py index 8ab4a458f..95d259811 100644 --- a/foundry/models/ontology_object_type.py +++ b/foundry/models/ontology_object_type.py @@ -37,24 +37,21 @@ from pydantic import Field from typing_extensions import Self - class OntologyObjectType(BaseModel): """ OntologyObjectType - """ # noqa: E501 - - object_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["object"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_syncing.py b/foundry/models/ontology_syncing.py index d27bb050b..58f00fe82 100644 --- a/foundry/models/ontology_syncing.py +++ b/foundry/models/ontology_syncing.py @@ -38,28 +38,29 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self - class OntologySyncing(BaseModel): """ - The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. - """ # noqa: E501 - + The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_v2.py b/foundry/models/ontology_v2.py index bf5a79da4..9b9968ef9 100644 --- a/foundry/models/ontology_v2.py +++ b/foundry/models/ontology_v2.py @@ -37,23 +37,22 @@ from pydantic import Field from typing_extensions import Self - class OntologyV2(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - rid: StrictStr = Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/open_transaction_already_exists.py b/foundry/models/open_transaction_already_exists.py index 633f04ef0..7431a3844 100644 --- a/foundry/models/open_transaction_already_exists.py +++ b/foundry/models/open_transaction_already_exists.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class OpenTransactionAlreadyExists(BaseModel): """ A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/operation_not_found.py b/foundry/models/operation_not_found.py index 811451b0f..9f1dce805 100644 --- a/foundry/models/operation_not_found.py +++ b/foundry/models/operation_not_found.py @@ -38,28 +38,29 @@ from foundry.models.operation_not_found_parameters import OperationNotFoundParameters from typing_extensions import Self - class OperationNotFound(BaseModel): """ The operation is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OperationNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/operation_not_found_parameters.py b/foundry/models/operation_not_found_parameters.py index a0b8ff9d8..5c81f8157 100644 --- a/foundry/models/operation_not_found_parameters.py +++ b/foundry/models/operation_not_found_parameters.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class OperationNotFoundParameters(BaseModel): """ OperationNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 id: StrictStr __properties: ClassVar[Set[str]] = set(("id")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter.py b/foundry/models/parameter.py index d5065065c..9613dfeb9 100644 --- a/foundry/models/parameter.py +++ b/foundry/models/parameter.py @@ -38,22 +38,22 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self - class Parameter(BaseModel): """ Details about a parameter of an action or query. - """ # noqa: E501 - - base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="baseType", - ) + """ # noqa: E501 + base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") data_type: Optional[OntologyDataType] = Field(default=None, alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("baseType", "dataType", "description", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,12 +81,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -98,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_object_not_found.py b/foundry/models/parameter_object_not_found.py index a4e168414..6dddf28ab 100644 --- a/foundry/models/parameter_object_not_found.py +++ b/foundry/models/parameter_object_not_found.py @@ -38,28 +38,29 @@ from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters from typing_extensions import Self - class ParameterObjectNotFound(BaseModel): """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 - + The parameter object reference or parameter default value is not found, or the client token does not have access to it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_object_not_found_parameters.py b/foundry/models/parameter_object_not_found_parameters.py index 69a374474..1653f2083 100644 --- a/foundry/models/parameter_object_not_found_parameters.py +++ b/foundry/models/parameter_object_not_found_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ParameterObjectNotFoundParameters(BaseModel): """ ParameterObjectNotFoundParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_object_set_rid_not_found.py b/foundry/models/parameter_object_set_rid_not_found.py index 40bea893e..52ee69bff 100644 --- a/foundry/models/parameter_object_set_rid_not_found.py +++ b/foundry/models/parameter_object_set_rid_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.parameter_object_set_rid_not_found_parameters import ( - ParameterObjectSetRidNotFoundParameters, -) +from foundry.models.parameter_object_set_rid_not_found_parameters import ParameterObjectSetRidNotFoundParameters from typing_extensions import Self - class ParameterObjectSetRidNotFound(BaseModel): """ - The parameter object set RID is not found, or the client token does not have access to it. - """ # noqa: E501 - + The parameter object set RID is not found, or the client token does not have access to it. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterObjectSetRidNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_object_set_rid_not_found_parameters.py b/foundry/models/parameter_object_set_rid_not_found_parameters.py index 20037296c..82aeb007f 100644 --- a/foundry/models/parameter_object_set_rid_not_found_parameters.py +++ b/foundry/models/parameter_object_set_rid_not_found_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class ParameterObjectSetRidNotFoundParameters(BaseModel): """ ParameterObjectSetRidNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 object_set_rid: StrictStr = Field(alias="objectSetRid") __properties: ClassVar[Set[str]] = set(("objectSetRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_type_not_supported.py b/foundry/models/parameter_type_not_supported.py index d8f33ac03..922058172 100644 --- a/foundry/models/parameter_type_not_supported.py +++ b/foundry/models/parameter_type_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.parameter_type_not_supported_parameters import ( - ParameterTypeNotSupportedParameters, -) +from foundry.models.parameter_type_not_supported_parameters import ParameterTypeNotSupportedParameters from typing_extensions import Self - class ParameterTypeNotSupported(BaseModel): """ - The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - + The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterTypeNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_type_not_supported_parameters.py b/foundry/models/parameter_type_not_supported_parameters.py index d76a3ad96..203b01f9e 100644 --- a/foundry/models/parameter_type_not_supported_parameters.py +++ b/foundry/models/parameter_type_not_supported_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ParameterTypeNotSupportedParameters(BaseModel): """ ParameterTypeNotSupportedParameters - """ # noqa: E501 - - parameter_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="parameterBaseType", - ) - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) + """ # noqa: E501 + parameter_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="parameterBaseType") + parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") __properties: ClassVar[Set[str]] = set(("parameterBaseType", "parameterId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameters_not_found.py b/foundry/models/parameters_not_found.py index 8517ae79c..d8118d166 100644 --- a/foundry/models/parameters_not_found.py +++ b/foundry/models/parameters_not_found.py @@ -38,28 +38,29 @@ from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters from typing_extensions import Self - class ParametersNotFound(BaseModel): """ - The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. - """ # noqa: E501 - + The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParametersNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameters_not_found_parameters.py b/foundry/models/parameters_not_found_parameters.py index 88e78737f..f882797c8 100644 --- a/foundry/models/parameters_not_found_parameters.py +++ b/foundry/models/parameters_not_found_parameters.py @@ -37,27 +37,21 @@ from pydantic import Field from typing_extensions import Self - class ParametersNotFoundParameters(BaseModel): """ ParametersNotFoundParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - configured_parameter_ids: Optional[List[StrictStr]] = Field( - default=None, alias="configuredParameterIds" - ) - unknown_parameter_ids: Optional[List[StrictStr]] = Field( - default=None, alias="unknownParameterIds" - ) - __properties: ClassVar[Set[str]] = set( - ("actionType", "configuredParameterIds", "unknownParameterIds") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + """ # noqa: E501 + action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") + configured_parameter_ids: Optional[List[StrictStr]] = Field(default=None, alias="configuredParameterIds") + unknown_parameter_ids: Optional[List[StrictStr]] = Field(default=None, alias="unknownParameterIds") + __properties: ClassVar[Set[str]] = set(("actionType", "configuredParameterIds", "unknownParameterIds")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -99,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parent_attachment_permission_denied.py b/foundry/models/parent_attachment_permission_denied.py index 2a472da85..f6a5825c4 100644 --- a/foundry/models/parent_attachment_permission_denied.py +++ b/foundry/models/parent_attachment_permission_denied.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class ParentAttachmentPermissionDenied(BaseModel): """ - The user does not have permission to parent attachments. - """ # noqa: E501 - + The user does not have permission to parent attachments. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/polygon.py b/foundry/models/polygon.py index 9b58afccb..933f4cb68 100644 --- a/foundry/models/polygon.py +++ b/foundry/models/polygon.py @@ -38,32 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class Polygon(BaseModel): """ Polygon - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=4), - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]] = None type: Literal["Polygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_filterable.py b/foundry/models/properties_not_filterable.py index 7f9ee8560..ba8459514 100644 --- a/foundry/models/properties_not_filterable.py +++ b/foundry/models/properties_not_filterable.py @@ -38,28 +38,29 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self - class PropertiesNotFilterable(BaseModel): """ - Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. - """ # noqa: E501 - + Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_found.py b/foundry/models/properties_not_found.py index dcac52b9d..bebdb101e 100644 --- a/foundry/models/properties_not_found.py +++ b/foundry/models/properties_not_found.py @@ -38,28 +38,29 @@ from foundry.models.properties_not_found_parameters import PropertiesNotFoundParameters from typing_extensions import Self - class PropertiesNotFound(BaseModel): """ The requested properties are not found on the object type. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertiesNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_found_parameters.py b/foundry/models/properties_not_found_parameters.py index 94e03e21a..4cd787bc1 100644 --- a/foundry/models/properties_not_found_parameters.py +++ b/foundry/models/properties_not_found_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class PropertiesNotFoundParameters(BaseModel): """ PropertiesNotFoundParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) + """ # noqa: E501 + object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("objectType", "properties")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_searchable.py b/foundry/models/properties_not_searchable.py index 12cdb2835..f12acb028 100644 --- a/foundry/models/properties_not_searchable.py +++ b/foundry/models/properties_not_searchable.py @@ -38,28 +38,29 @@ from foundry.models.properties_not_searchable_parameters import PropertiesNotSearchableParameters from typing_extensions import Self - class PropertiesNotSearchable(BaseModel): """ - Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. - """ # noqa: E501 - + Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertiesNotSearchableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_searchable_parameters.py b/foundry/models/properties_not_searchable_parameters.py index edf8e3c87..00fd24dcf 100644 --- a/foundry/models/properties_not_searchable_parameters.py +++ b/foundry/models/properties_not_searchable_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class PropertiesNotSearchableParameters(BaseModel): """ PropertiesNotSearchableParameters - """ # noqa: E501 - + """ # noqa: E501 property_api_names: Optional[List[StrictStr]] = Field(default=None, alias="propertyApiNames") __properties: ClassVar[Set[str]] = set(("propertyApiNames")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_sortable.py b/foundry/models/properties_not_sortable.py index bf3d2e95f..d91166dd8 100644 --- a/foundry/models/properties_not_sortable.py +++ b/foundry/models/properties_not_sortable.py @@ -38,28 +38,29 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self - class PropertiesNotSortable(BaseModel): """ - Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. - """ # noqa: E501 - + Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_api_name_not_found.py b/foundry/models/property_api_name_not_found.py index f909e279d..57c3ac583 100644 --- a/foundry/models/property_api_name_not_found.py +++ b/foundry/models/property_api_name_not_found.py @@ -38,28 +38,29 @@ from foundry.models.property_api_name_not_found_parameters import PropertyApiNameNotFoundParameters from typing_extensions import Self - class PropertyApiNameNotFound(BaseModel): """ - A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. - """ # noqa: E501 - + A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertyApiNameNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_api_name_not_found_parameters.py b/foundry/models/property_api_name_not_found_parameters.py index 9f11163cc..98d0b0546 100644 --- a/foundry/models/property_api_name_not_found_parameters.py +++ b/foundry/models/property_api_name_not_found_parameters.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class PropertyApiNameNotFoundParameters(BaseModel): """ PropertyApiNameNotFoundParameters - """ # noqa: E501 - - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - property_id: StrictStr = Field( - description="The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. ", - alias="propertyId", - ) + """ # noqa: E501 + property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") + property_id: StrictStr = Field(description="The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. ", alias="propertyId") __properties: ClassVar[Set[str]] = set(("propertyBaseType", "propertyId")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_base_type_not_supported.py b/foundry/models/property_base_type_not_supported.py index 59015c498..9be6bfd09 100644 --- a/foundry/models/property_base_type_not_supported.py +++ b/foundry/models/property_base_type_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) +from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters from typing_extensions import Self - class PropertyBaseTypeNotSupported(BaseModel): """ - The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - + The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_filters_not_supported.py b/foundry/models/property_filters_not_supported.py index de23da27e..69ebdcb97 100644 --- a/foundry/models/property_filters_not_supported.py +++ b/foundry/models/property_filters_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) +from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters from typing_extensions import Self - class PropertyFiltersNotSupported(BaseModel): """ - At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. - """ # noqa: E501 - + At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_types_search_not_supported.py b/foundry/models/property_types_search_not_supported.py index 7a56a7e68..a43085e20 100644 --- a/foundry/models/property_types_search_not_supported.py +++ b/foundry/models/property_types_search_not_supported.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.property_types_search_not_supported_parameters import ( - PropertyTypesSearchNotSupportedParameters, -) +from foundry.models.property_types_search_not_supported_parameters import PropertyTypesSearchNotSupportedParameters from typing_extensions import Self - class PropertyTypesSearchNotSupported(BaseModel): """ - The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. - """ # noqa: E501 - + The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertyTypesSearchNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_types_search_not_supported_parameters.py b/foundry/models/property_types_search_not_supported_parameters.py index 23191aabc..16b039618 100644 --- a/foundry/models/property_types_search_not_supported_parameters.py +++ b/foundry/models/property_types_search_not_supported_parameters.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class PropertyTypesSearchNotSupportedParameters(BaseModel): """ PropertyTypesSearchNotSupportedParameters - """ # noqa: E501 - + """ # noqa: E501 parameters: Optional[Dict[str, List[StrictStr]]] = None __properties: ClassVar[Set[str]] = set(("parameters")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/property_v2.py b/foundry/models/property_v2.py index 5342f2ec6..2a518bf0f 100644 --- a/foundry/models/property_v2.py +++ b/foundry/models/property_v2.py @@ -38,20 +38,21 @@ from foundry.models.object_property_type import ObjectPropertyType from typing_extensions import Self - class PropertyV2(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - + """ # noqa: E501 data_type: ObjectPropertyType = Field(alias="dataType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") __properties: ClassVar[Set[str]] = set(("dataType", "description", "displayName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -96,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/put_schema_permission_denied.py b/foundry/models/put_schema_permission_denied.py index 9a0a9610e..3c8714387 100644 --- a/foundry/models/put_schema_permission_denied.py +++ b/foundry/models/put_schema_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self - class PutSchemaPermissionDenied(BaseModel): """ todo - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_aggregation_key_type.py b/foundry/models/query_aggregation_key_type.py index 03c0ac36c..03d8cff53 100644 --- a/foundry/models/query_aggregation_key_type.py +++ b/foundry/models/query_aggregation_key_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -49,21 +48,13 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation keys. """ -QueryAggregationKeyType = Annotated[ - Union[ - BooleanType, - DateType, - DoubleType, - IntegerType, - QueryAggregationRangeType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +QueryAggregationKeyType = Annotated[Union[BooleanType, DateType, DoubleType, IntegerType, QueryAggregationRangeType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_aggregation_range_sub_type.py b/foundry/models/query_aggregation_range_sub_type.py index 63731e76d..16c0246ba 100644 --- a/foundry/models/query_aggregation_range_sub_type.py +++ b/foundry/models/query_aggregation_range_sub_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -46,17 +45,16 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation ranges. """ -QueryAggregationRangeSubType = Annotated[ - Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type") -] +QueryAggregationRangeSubType = Annotated[Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__( - QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType) -) +object.__setattr__(QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType)) diff --git a/foundry/models/query_aggregation_range_type.py b/foundry/models/query_aggregation_range_type.py index 2e5368370..1ae4bb2cb 100644 --- a/foundry/models/query_aggregation_range_type.py +++ b/foundry/models/query_aggregation_range_type.py @@ -38,17 +38,20 @@ from foundry.models.query_aggregation_range_sub_type import QueryAggregationRangeSubType from typing_extensions import Self - class QueryAggregationRangeType(BaseModel): """ QueryAggregationRangeType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryAggregationRangeSubType = Field(alias="subType") type: Literal["range"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_aggregation_value_type.py b/foundry/models/query_aggregation_value_type.py index c0b2cf5fa..a76310413 100644 --- a/foundry/models/query_aggregation_value_type.py +++ b/foundry/models/query_aggregation_value_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -45,17 +44,16 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation keys. """ -QueryAggregationValueType = Annotated[ - Union[DateType, DoubleType, TimestampType], Field(discriminator="type") -] +QueryAggregationValueType = Annotated[Union[DateType, DoubleType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__( - QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType) -) +object.__setattr__(QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType)) diff --git a/foundry/models/query_data_type.py b/foundry/models/query_data_type.py index d1e4c442d..059e3a873 100644 --- a/foundry/models/query_data_type.py +++ b/foundry/models/query_data_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -63,13 +62,17 @@ class QueryUnionType(BaseModel): """ QueryUnionType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["union"] union_types: Optional[List[QueryDataType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -97,7 +100,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -106,7 +110,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict["unionTypes"] = _items + _dict['unionTypes'] = _items return _dict @classmethod @@ -118,29 +122,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryUnionType.model_rebuild(raise_errors=False) - class QueryStructField(BaseModel): """ QueryStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: QueryDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -168,12 +174,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -185,29 +192,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryStructField.model_rebuild(raise_errors=False) - class QueryStructType(BaseModel): """ QueryStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[QueryStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -235,7 +244,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -244,7 +254,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -256,29 +266,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryStructType.model_rebuild(raise_errors=False) - class QuerySetType(BaseModel): """ QuerySetType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryDataType = Field(alias="subType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -306,12 +318,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -323,29 +336,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QuerySetType.model_rebuild(raise_errors=False) - class QueryArrayType(BaseModel): """ QueryArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryDataType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -373,12 +388,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -390,15 +406,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryArrayType.model_rebuild(raise_errors=False) @@ -406,30 +421,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Query parameters or outputs. """ -QueryDataType = Annotated[ - Union[ - AttachmentType, - BooleanType, - DateType, - DoubleType, - FloatType, - IntegerType, - LongType, - NullType, - OntologyObjectSetType, - OntologyObjectType, - QueryArrayType, - QuerySetType, - QueryStructType, - QueryUnionType, - StringType, - ThreeDimensionalAggregation, - TimestampType, - TwoDimensionalAggregation, - UnsupportedType, - ], - Field(discriminator="type"), -] +QueryDataType = Annotated[Union[AttachmentType, BooleanType, DateType, DoubleType, FloatType, IntegerType, LongType, NullType, OntologyObjectSetType, OntologyObjectType, QueryArrayType, QuerySetType, QueryStructType, QueryUnionType, StringType, ThreeDimensionalAggregation, TimestampType, TwoDimensionalAggregation, UnsupportedType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_encountered_user_facing_error.py b/foundry/models/query_encountered_user_facing_error.py index 2d76bdabc..54eea50d5 100644 --- a/foundry/models/query_encountered_user_facing_error.py +++ b/foundry/models/query_encountered_user_facing_error.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) +from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters from typing_extensions import Self - class QueryEncounteredUserFacingError(BaseModel): """ - The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 - + The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_memory_exceeded_limit.py b/foundry/models/query_memory_exceeded_limit.py index bc7ad8566..bba95ed34 100644 --- a/foundry/models/query_memory_exceeded_limit.py +++ b/foundry/models/query_memory_exceeded_limit.py @@ -38,28 +38,29 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self - class QueryMemoryExceededLimit(BaseModel): """ - Memory limits were exceeded for the `Query` execution. - """ # noqa: E501 - + Memory limits were exceeded for the `Query` execution. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("TIMEOUT"): + if value not in ('TIMEOUT'): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_not_found.py b/foundry/models/query_not_found.py index 9475af5cc..501f93710 100644 --- a/foundry/models/query_not_found.py +++ b/foundry/models/query_not_found.py @@ -38,28 +38,29 @@ from foundry.models.query_not_found_parameters import QueryNotFoundParameters from typing_extensions import Self - class QueryNotFound(BaseModel): """ The query is not found, or the user does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: QueryNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_not_found_parameters.py b/foundry/models/query_not_found_parameters.py index 667e32a8f..a051ae929 100644 --- a/foundry/models/query_not_found_parameters.py +++ b/foundry/models/query_not_found_parameters.py @@ -37,16 +37,19 @@ from pydantic import Field from typing_extensions import Self - class QueryNotFoundParameters(BaseModel): """ QueryNotFoundParameters - """ # noqa: E501 - + """ # noqa: E501 query: StrictStr = Field(description="The name of the Query in the API. ") __properties: ClassVar[Set[str]] = set(("query")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -88,10 +92,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_parameter_v2.py b/foundry/models/query_parameter_v2.py index 36c71ac98..a9fd86e52 100644 --- a/foundry/models/query_parameter_v2.py +++ b/foundry/models/query_parameter_v2.py @@ -38,17 +38,20 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self - class QueryParameterV2(BaseModel): """ Details about a parameter of a query. - """ # noqa: E501 - + """ # noqa: E501 data_type: QueryDataType = Field(alias="dataType") description: Optional[StrictStr] = None __properties: ClassVar[Set[str]] = set(("dataType", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_time_exceeded_limit.py b/foundry/models/query_time_exceeded_limit.py index a7f0e42ad..22d79a8b1 100644 --- a/foundry/models/query_time_exceeded_limit.py +++ b/foundry/models/query_time_exceeded_limit.py @@ -38,28 +38,29 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self - class QueryTimeExceededLimit(BaseModel): """ - Time limits were exceeded for the `Query` execution. - """ # noqa: E501 - + Time limits were exceeded for the `Query` execution. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("TIMEOUT"): + if value not in ('TIMEOUT'): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_type.py b/foundry/models/query_type.py index c37e3f354..d4349dede 100644 --- a/foundry/models/query_type.py +++ b/foundry/models/query_type.py @@ -39,30 +39,25 @@ from foundry.models.parameter import Parameter from typing_extensions import Self - class QueryType(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") output: Optional[OntologyDataType] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " - ) - version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " - ) - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "output", "parameters", "rid", "version") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") + version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,19 +85,20 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict["output"] = self.output.to_dict() + _dict['output'] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -114,10 +110,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_type_v2.py b/foundry/models/query_type_v2.py index 02d8ef095..10e2ed1c0 100644 --- a/foundry/models/query_type_v2.py +++ b/foundry/models/query_type_v2.py @@ -39,30 +39,25 @@ from foundry.models.query_parameter_v2 import QueryParameterV2 from typing_extensions import Self - class QueryTypeV2(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") output: QueryDataType parameters: Optional[Dict[str, QueryParameterV2]] = None - rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " - ) - version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " - ) - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "output", "parameters", "rid", "version") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") + version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,19 +85,20 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict["output"] = self.output.to_dict() + _dict['output'] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -114,10 +110,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/read_table_permission_denied.py b/foundry/models/read_table_permission_denied.py index 1dcd3a70e..c4b012303 100644 --- a/foundry/models/read_table_permission_denied.py +++ b/foundry/models/read_table_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self - class ReadTablePermissionDenied(BaseModel): """ The provided token does not have permission to read the given dataset as a table. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/release_status.py b/foundry/models/release_status.py index a1a993020..1df522dfb 100644 --- a/foundry/models/release_status.py +++ b/foundry/models/release_status.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,11 +48,13 @@ class ReleaseStatus(str, Enum): """ allowed enum values """ - ACTIVE = "ACTIVE" - EXPERIMENTAL = "EXPERIMENTAL" - DEPRECATED = "DEPRECATED" + ACTIVE = 'ACTIVE' + EXPERIMENTAL = 'EXPERIMENTAL' + DEPRECATED = 'DEPRECATED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReleaseStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/resource_name_already_exists.py b/foundry/models/resource_name_already_exists.py index f2675eeb0..c5b791966 100644 --- a/foundry/models/resource_name_already_exists.py +++ b/foundry/models/resource_name_already_exists.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.resource_name_already_exists_parameters import ( - ResourceNameAlreadyExistsParameters, -) +from foundry.models.resource_name_already_exists_parameters import ResourceNameAlreadyExistsParameters from typing_extensions import Self - class ResourceNameAlreadyExists(BaseModel): """ The provided resource name is already in use by another resource in the same folder. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ResourceNameAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("CONFLICT"): + if value not in ('CONFLICT'): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/resource_name_already_exists_parameters.py b/foundry/models/resource_name_already_exists_parameters.py index 8ac8371d8..6cb3d7d61 100644 --- a/foundry/models/resource_name_already_exists_parameters.py +++ b/foundry/models/resource_name_already_exists_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ResourceNameAlreadyExistsParameters(BaseModel): """ ResourceNameAlreadyExistsParameters - """ # noqa: E501 - + """ # noqa: E501 parent_folder_rid: StrictStr = Field(alias="parentFolderRid") resource_name: StrictStr = Field(alias="resourceName") __properties: ClassVar[Set[str]] = set(("parentFolderRid", "resourceName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/return_edits_mode.py b/foundry/models/return_edits_mode.py index 78d2adb57..38b9498f4 100644 --- a/foundry/models/return_edits_mode.py +++ b/foundry/models/return_edits_mode.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,10 +48,12 @@ class ReturnEditsMode(str, Enum): """ allowed enum values """ - ALL = "ALL" - NONE = "NONE" + ALL = 'ALL' + NONE = 'NONE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReturnEditsMode from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/schema_not_found.py b/foundry/models/schema_not_found.py index 6b88749a3..2efd614e6 100644 --- a/foundry/models/schema_not_found.py +++ b/foundry/models/schema_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) +from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters from typing_extensions import Self - class SchemaNotFound(BaseModel): """ A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/short_type.py b/foundry/models/short_type.py index a4b8f7d6e..22263bac3 100644 --- a/foundry/models/short_type.py +++ b/foundry/models/short_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class ShortType(BaseModel): """ ShortType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["short"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/string_type.py b/foundry/models/string_type.py index 4a53d17d2..97732ad2f 100644 --- a/foundry/models/string_type.py +++ b/foundry/models/string_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class StringType(BaseModel): """ StringType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["string"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/table_export_format.py b/foundry/models/table_export_format.py index 75e6f213d..f47ff578b 100644 --- a/foundry/models/table_export_format.py +++ b/foundry/models/table_export_format.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,16 +42,18 @@ class TableExportFormat(str, Enum): """ - Format for tabular dataset export. + Format for tabular dataset export. """ """ allowed enum values """ - ARROW = "ARROW" - CSV = "CSV" + ARROW = 'ARROW' + CSV = 'CSV' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TableExportFormat from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/three_dimensional_aggregation.py b/foundry/models/three_dimensional_aggregation.py index 15966c667..c688b1934 100644 --- a/foundry/models/three_dimensional_aggregation.py +++ b/foundry/models/three_dimensional_aggregation.py @@ -39,18 +39,21 @@ from foundry.models.two_dimensional_aggregation import TwoDimensionalAggregation from typing_extensions import Self - class ThreeDimensionalAggregation(BaseModel): """ ThreeDimensionalAggregation - """ # noqa: E501 - + """ # noqa: E501 key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["threeDimensionalAggregation"] value_type: TwoDimensionalAggregation = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,15 +81,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -98,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/time_series_item_type.py b/foundry/models/time_series_item_type.py index 770ed56bb..ea15062ad 100644 --- a/foundry/models/time_series_item_type.py +++ b/foundry/models/time_series_item_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -44,12 +43,15 @@ from foundry.models.string_type import StringType + """ A union of the types supported by time series properties. """ TimeSeriesItemType = Annotated[Union[DoubleType, StringType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. diff --git a/foundry/models/timeseries_type.py b/foundry/models/timeseries_type.py index 64e0ce21e..415e94abd 100644 --- a/foundry/models/timeseries_type.py +++ b/foundry/models/timeseries_type.py @@ -38,17 +38,20 @@ from foundry.models.time_series_item_type import TimeSeriesItemType from typing_extensions import Self - class TimeseriesType(BaseModel): """ TimeseriesType - """ # noqa: E501 - + """ # noqa: E501 item_type: TimeSeriesItemType = Field(alias="itemType") type: Literal["timeseries"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/timestamp_type.py b/foundry/models/timestamp_type.py index e4ab4bb47..dbfe8299c 100644 --- a/foundry/models/timestamp_type.py +++ b/foundry/models/timestamp_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class TimestampType(BaseModel): """ TimestampType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["timestamp"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction.py b/foundry/models/transaction.py index b66b14361..60f3ccd3b 100644 --- a/foundry/models/transaction.py +++ b/foundry/models/transaction.py @@ -39,31 +39,23 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self - class Transaction(BaseModel): """ - An operation that modifies the files within a dataset. - """ # noqa: E501 - - closed_time: Optional[datetime] = Field( - default=None, - description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", - alias="closedTime", - ) - created_time: datetime = Field( - description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", - alias="createdTime", - ) - rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. " - ) + An operation that modifies the files within a dataset. + """ # noqa: E501 + closed_time: Optional[datetime] = Field(default=None, description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", alias="closedTime") + created_time: datetime = Field(description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", alias="createdTime") + rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ") status: TransactionStatus transaction_type: TransactionType = Field(alias="transactionType") - __properties: ClassVar[Set[str]] = set( - ("closedTime", "createdTime", "rid", "status", "transactionType") - ) + __properties: ClassVar[Set[str]] = set(("closedTime", "createdTime", "rid", "status", "transactionType")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_not_committed.py b/foundry/models/transaction_not_committed.py index 173635a72..1013c4a33 100644 --- a/foundry/models/transaction_not_committed.py +++ b/foundry/models/transaction_not_committed.py @@ -38,28 +38,29 @@ from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters from typing_extensions import Self - class TransactionNotCommitted(BaseModel): """ The given transaction has not been committed. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_not_committed_parameters.py b/foundry/models/transaction_not_committed_parameters.py index beaf630a3..a53c86b30 100644 --- a/foundry/models/transaction_not_committed_parameters.py +++ b/foundry/models/transaction_not_committed_parameters.py @@ -38,24 +38,21 @@ from foundry.models.transaction_status import TransactionStatus from typing_extensions import Self - class TransactionNotCommittedParameters(BaseModel): """ TransactionNotCommittedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") transaction_status: TransactionStatus = Field(alias="transactionStatus") __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionStatus")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -97,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_not_found.py b/foundry/models/transaction_not_found.py index 9a5b03a38..4102d498a 100644 --- a/foundry/models/transaction_not_found.py +++ b/foundry/models/transaction_not_found.py @@ -35,33 +35,32 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) +from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters from typing_extensions import Self - class TransactionNotFound(BaseModel): """ The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("NOT_FOUND"): + if value not in ('NOT_FOUND'): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -89,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -106,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_not_open.py b/foundry/models/transaction_not_open.py index 871afd83e..a8bcff413 100644 --- a/foundry/models/transaction_not_open.py +++ b/foundry/models/transaction_not_open.py @@ -38,28 +38,29 @@ from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters from typing_extensions import Self - class TransactionNotOpen(BaseModel): """ The given transaction is not open. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_status.py b/foundry/models/transaction_status.py index c8790b6e3..feb53c84e 100644 --- a/foundry/models/transaction_status.py +++ b/foundry/models/transaction_status.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,17 +42,19 @@ class TransactionStatus(str, Enum): """ - The status of a Transaction. + The status of a Transaction. """ """ allowed enum values """ - ABORTED = "ABORTED" - COMMITTED = "COMMITTED" - OPEN = "OPEN" + ABORTED = 'ABORTED' + COMMITTED = 'COMMITTED' + OPEN = 'OPEN' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/transaction_type.py b/foundry/models/transaction_type.py index 4bedfadc0..26b0bb8e9 100644 --- a/foundry/models/transaction_type.py +++ b/foundry/models/transaction_type.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,18 +42,20 @@ class TransactionType(str, Enum): """ - The type of a Transaction. + The type of a Transaction. """ """ allowed enum values """ - APPEND = "APPEND" - UPDATE = "UPDATE" - SNAPSHOT = "SNAPSHOT" - DELETE = "DELETE" + APPEND = 'APPEND' + UPDATE = 'UPDATE' + SNAPSHOT = 'SNAPSHOT' + DELETE = 'DELETE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/two_dimensional_aggregation.py b/foundry/models/two_dimensional_aggregation.py index 3d7e8328c..aca1dd877 100644 --- a/foundry/models/two_dimensional_aggregation.py +++ b/foundry/models/two_dimensional_aggregation.py @@ -39,18 +39,21 @@ from foundry.models.query_aggregation_value_type import QueryAggregationValueType from typing_extensions import Self - class TwoDimensionalAggregation(BaseModel): """ TwoDimensionalAggregation - """ # noqa: E501 - + """ # noqa: E501 key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["twoDimensionalAggregation"] value_type: QueryAggregationValueType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,15 +81,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -98,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unknown_distance_unit.py b/foundry/models/unknown_distance_unit.py index 3f280663a..7c88348b6 100644 --- a/foundry/models/unknown_distance_unit.py +++ b/foundry/models/unknown_distance_unit.py @@ -38,28 +38,29 @@ from foundry.models.unknown_distance_unit_parameters import UnknownDistanceUnitParameters from typing_extensions import Self - class UnknownDistanceUnit(BaseModel): """ An unknown distance unit was provided. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: UnknownDistanceUnitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unknown_distance_unit_parameters.py b/foundry/models/unknown_distance_unit_parameters.py index 8347af357..712f74fea 100644 --- a/foundry/models/unknown_distance_unit_parameters.py +++ b/foundry/models/unknown_distance_unit_parameters.py @@ -38,17 +38,20 @@ from foundry.models.distance_unit import DistanceUnit from typing_extensions import Self - class UnknownDistanceUnitParameters(BaseModel): """ UnknownDistanceUnitParameters - """ # noqa: E501 - + """ # noqa: E501 known_units: Optional[List[DistanceUnit]] = Field(default=None, alias="knownUnits") unknown_unit: StrictStr = Field(alias="unknownUnit") __properties: ClassVar[Set[str]] = set(("knownUnits", "unknownUnit")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -90,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unknown_parameter.py b/foundry/models/unknown_parameter.py index 896659443..06e64d67c 100644 --- a/foundry/models/unknown_parameter.py +++ b/foundry/models/unknown_parameter.py @@ -38,28 +38,29 @@ from foundry.models.unknown_parameter_parameters import UnknownParameterParameters from typing_extensions import Self - class UnknownParameter(BaseModel): """ - The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. - """ # noqa: E501 - + The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: UnknownParameterParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unknown_parameter_parameters.py b/foundry/models/unknown_parameter_parameters.py index a0a0a0c6a..e8af08609 100644 --- a/foundry/models/unknown_parameter_parameters.py +++ b/foundry/models/unknown_parameter_parameters.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class UnknownParameterParameters(BaseModel): """ UnknownParameterParameters - """ # noqa: E501 - + """ # noqa: E501 expected_parameters: Optional[List[StrictStr]] = Field(default=None, alias="expectedParameters") unknown_parameters: Optional[List[StrictStr]] = Field(default=None, alias="unknownParameters") __properties: ClassVar[Set[str]] = set(("expectedParameters", "unknownParameters")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unsupported_object_set.py b/foundry/models/unsupported_object_set.py index e10612026..b276fef54 100644 --- a/foundry/models/unsupported_object_set.py +++ b/foundry/models/unsupported_object_set.py @@ -37,28 +37,29 @@ from pydantic import Field from typing_extensions import Self - class UnsupportedObjectSet(BaseModel): """ The requested object set is not supported. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): + if value not in ('INVALID_ARGUMENT'): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -100,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unsupported_type.py b/foundry/models/unsupported_type.py index c816a5ae6..770c3217d 100644 --- a/foundry/models/unsupported_type.py +++ b/foundry/models/unsupported_type.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class UnsupportedType(BaseModel): """ UnsupportedType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["unsupported"] unsupported_type: Literal["unsupported"] = Field(alias="unsupportedType") __properties: ClassVar[Set[str]] = set(("type", "unsupportedType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/upload_file_permission_denied.py b/foundry/models/upload_file_permission_denied.py index 7a04bcd70..cd9e18454 100644 --- a/foundry/models/upload_file_permission_denied.py +++ b/foundry/models/upload_file_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters from typing_extensions import Self - class UploadFilePermissionDenied(BaseModel): """ The provided token does not have permission to upload the given file to the given dataset and transaction. - """ # noqa: E501 - + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/view_object_permission_denied.py b/foundry/models/view_object_permission_denied.py index 240d921c9..8ec8eb703 100644 --- a/foundry/models/view_object_permission_denied.py +++ b/foundry/models/view_object_permission_denied.py @@ -38,28 +38,29 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self - class ViewObjectPermissionDenied(BaseModel): """ - The user does not have permission to view objects of this `ObjectType`. - """ # noqa: E501 - + The user does not have permission to view objects of this `ObjectType`. + """ # noqa: E501 error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) + __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) - @field_validator("error_code") + @field_validator('error_code') def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ("PERMISSION_DENIED"): + if value not in ('PERMISSION_DENIED'): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,12 +88,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict["parameters"] = self.parameters.to_dict() + _dict['parameters'] = self.parameters.to_dict() return _dict @classmethod @@ -104,10 +106,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/rest.py b/foundry/rest.py index a9c664497..61816ff7e 100644 --- a/foundry/rest.py +++ b/foundry/rest.py @@ -52,6 +52,7 @@ def data(self) -> bytes: class RESTResponse(io.IOBase): + def __init__(self, resp: Urllib3Response) -> None: self.response = resp self.status = resp.status @@ -73,6 +74,7 @@ def getheader(self, name, default=None): class RESTClientObject: + def __init__(self, configuration: Configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -88,12 +90,21 @@ def __init__(self, configuration: Configuration) -> None: addition_pool_args = {} if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries + addition_pool_args['retries'] = configuration.retries - self.pool_manager = urllib3.PoolManager(cert_reqs=cert_reqs, **addition_pool_args) + self.pool_manager = urllib3.PoolManager( + cert_reqs=cert_reqs, + **addition_pool_args + ) def request( - self, method, url, headers=None, body=None, post_params=None, _request_timeout=None + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None ): """Perform requests. @@ -110,10 +121,20 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] if post_params and body: - raise ApiValueError("body parameter cannot be used with post_params parameter.") + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) post_params = post_params or {} headers = headers or {} @@ -122,15 +143,25 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + # no content type provided or payload is json - content_type = headers.get("Content-Type") - if not content_type or re.search("json", content_type, re.IGNORECASE): + content_type = headers.get('Content-Type') + if ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ): request_body = None if body is not None: request_body = json.dumps(body) @@ -140,9 +171,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) - elif content_type == "application/x-www-form-urlencoded": + elif content_type == 'application/x-www-form-urlencoded': r = self.pool_manager.request( method, url, @@ -150,13 +181,13 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) - elif content_type == "multipart/form-data": + elif content_type == 'multipart/form-data': # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers["Content-Type"] + del headers['Content-Type'] r = self.pool_manager.request( method, url, @@ -164,7 +195,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is @@ -177,7 +208,7 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False, + preload_content=False ) else: # Cannot generate the request from given parameters @@ -188,7 +219,12 @@ def request( # For `GET`, `HEAD` else: r = self.pool_manager.request( - method, url, fields={}, timeout=timeout, headers=headers, preload_content=False + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)]) diff --git a/scripts/set_version.py b/scripts/set_version.py index f005bf03d..8760a827d 100644 --- a/scripts/set_version.py +++ b/scripts/set_version.py @@ -16,7 +16,7 @@ gitversion = subprocess.check_output("git describe --tags --abbrev=0".split()).decode().strip() -path = "{{packageName}}/versions.py" +path = "foundry/versions.py" with open(path, "r") as f: content = f.read() diff --git a/test/__init__.py b/test/__init__.py index 490e9ab88..2b4e3a13f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/test/api/test_datasets_api_service_api.py b/test/api/test_datasets_api_service_api.py index 40859dff6..ebf64b51c 100644 --- a/test/api/test_datasets_api_service_api.py +++ b/test/api/test_datasets_api_service_api.py @@ -158,5 +158,7 @@ def test_read_table_can_pass_in_str(client: FoundryClient, monkeypatch): def test_read_table_can_pass_enum(client: FoundryClient, monkeypatch): mock_data_read(monkeypatch, data=b"hello") - res = client.datasets.read_table(format=TableExportFormat.CSV, dataset_rid="test.rid") + res = client.datasets.read_table( + format=TableExportFormat.CSV, dataset_rid="test.rid" + ) assert res == b"hello" diff --git a/test/models/test_create_dataset_request.py b/test/models/test_create_dataset_request.py index 3a9cfb12b..19bbe2168 100644 --- a/test/models/test_create_dataset_request.py +++ b/test/models/test_create_dataset_request.py @@ -39,7 +39,9 @@ def test_to_dict(): def test_from_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest.from_dict({"name": "FOLDER_NAME", "parentFolderRid": 123}), + lambda: CreateDatasetRequest.from_dict( + {"name": "FOLDER_NAME", "parentFolderRid": 123} + ), ) @@ -53,5 +55,7 @@ def test_from_fails_missing(): def test_init_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest(name="FOLDER_NAME", parentFolderRid=123), # type: ignore + lambda: CreateDatasetRequest( + name="FOLDER_NAME", parentFolderRid=123 # type: ignore + ), ) From 48ed527d3db07552b1d9493df4d795ab733ee737 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Mon, 22 Jan 2024 20:56:38 -0400 Subject: [PATCH 04/22] fix --- foundry/api/__init__.py | 1 - foundry/api/datasets_api_service_api.py | 1227 +++++++---------- foundry/api/ontologies_api_service_api.py | 593 ++++---- foundry/api/ontologies_v2_api_service_api.py | 733 +++++----- foundry/api_client.py | 138 +- foundry/api_response.py | 5 +- foundry/configuration.py | 3 +- foundry/exceptions.py | 13 +- foundry/models/__init__.py | 128 +- .../abort_transaction_permission_denied.py | 36 +- ...ransaction_permission_denied_parameters.py | 32 +- .../models/action_contains_duplicate_edits.py | 30 +- .../action_edited_properties_not_found.py | 32 +- foundry/models/action_not_found.py | 32 +- foundry/models/action_not_found_parameters.py | 26 +- .../action_parameter_object_not_found.py | 38 +- ...n_parameter_object_not_found_parameters.py | 27 +- .../action_parameter_object_type_not_found.py | 38 +- foundry/models/action_parameter_type.py | 42 +- foundry/models/action_parameter_v2.py | 24 +- foundry/models/action_type.py | 43 +- foundry/models/action_type_not_found.py | 32 +- .../action_type_not_found_parameters.py | 33 +- foundry/models/action_type_v2.py | 43 +- foundry/models/action_validation_failed.py | 34 +- .../action_validation_failed_parameters.py | 27 +- .../aggregation_group_count_exceeded_limit.py | 38 +- ...n_group_count_exceeded_limit_parameters.py | 22 +- foundry/models/any_type.py | 22 +- .../models/api_feature_preview_usage_only.py | 32 +- foundry/models/api_usage_denied.py | 30 +- foundry/models/apply_action_failed.py | 30 +- foundry/models/apply_action_mode.py | 7 +- .../models/apply_action_request_options.py | 22 +- foundry/models/async_operation_error.py | 26 +- foundry/models/attachment_not_found.py | 34 +- .../models/attachment_not_found_parameters.py | 28 +- .../models/attachment_size_exceeded_limit.py | 38 +- ...tachment_size_exceeded_limit_parameters.py | 22 +- foundry/models/attachment_type.py | 22 +- foundry/models/binary_type.py | 22 +- foundry/models/boolean_type.py | 22 +- foundry/models/branch.py | 34 +- foundry/models/branch_already_exists.py | 32 +- .../branch_already_exists_parameters.py | 31 +- foundry/models/branch_not_found.py | 32 +- foundry/models/byte_type.py | 22 +- foundry/models/column_types_not_supported.py | 32 +- .../column_types_not_supported_parameters.py | 27 +- .../commit_transaction_permission_denied.py | 36 +- .../composite_primary_key_not_supported.py | 38 +- ...te_primary_key_not_supported_parameters.py | 27 +- .../models/create_branch_permission_denied.py | 32 +- foundry/models/create_branch_request.py | 32 +- .../create_dataset_permission_denied.py | 36 +- ...te_dataset_permission_denied_parameters.py | 22 +- foundry/models/create_dataset_request.py | 22 +- foundry/models/create_link_rule.py | 52 +- foundry/models/create_object_rule.py | 27 +- .../create_transaction_permission_denied.py | 32 +- foundry/models/create_transaction_request.py | 22 +- foundry/models/dataset.py | 26 +- foundry/models/dataset_not_found.py | 32 +- foundry/models/date_type.py | 22 +- foundry/models/decimal_type.py | 22 +- .../models/delete_branch_permission_denied.py | 32 +- foundry/models/delete_link_rule.py | 52 +- foundry/models/delete_object_rule.py | 27 +- .../models/delete_schema_permission_denied.py | 36 +- ...ete_schema_permission_denied_parameters.py | 37 +- foundry/models/deployment_api.py | 24 +- foundry/models/deployment_listing.py | 29 +- foundry/models/deployment_metadata.py | 31 +- foundry/models/deployment_not_available.py | 32 +- .../deployment_not_available_parameters.py | 22 +- foundry/models/deployment_not_found.py | 32 +- foundry/models/deployment_transform_api.py | 26 +- foundry/models/distance_unit.py | 21 +- foundry/models/double_type.py | 22 +- foundry/models/duplicate_order_by.py | 32 +- .../models/duplicate_order_by_parameters.py | 22 +- .../models/edit_object_permission_denied.py | 32 +- foundry/models/file.py | 31 +- foundry/models/file_already_exists.py | 32 +- .../models/file_already_exists_parameters.py | 36 +- foundry/models/file_not_found_on_branch.py | 32 +- .../file_not_found_on_branch_parameters.py | 35 +- .../file_not_found_on_transaction_range.py | 36 +- ...t_found_on_transaction_range_parameters.py | 48 +- foundry/models/float_type.py | 22 +- foundry/models/folder_not_found.py | 32 +- foundry/models/folder_not_found_parameters.py | 22 +- .../function_encountered_user_facing_error.py | 38 +- ...ncountered_user_facing_error_parameters.py | 32 +- foundry/models/function_execution_failed.py | 32 +- .../function_execution_failed_parameters.py | 32 +- .../models/function_execution_timed_out.py | 32 +- foundry/models/function_invalid_input.py | 32 +- foundry/models/geo_point.py | 33 +- foundry/models/geo_point_type.py | 22 +- foundry/models/geo_shape_type.py | 22 +- foundry/models/geometry.py | 39 +- foundry/models/integer_type.py | 22 +- foundry/models/invalid_aggregation_range.py | 32 +- ...invalid_aggregation_range_property_type.py | 38 +- ...regation_range_property_type_parameters.py | 37 +- .../models/invalid_aggregation_range_value.py | 38 +- ...invalid_apply_action_option_combination.py | 36 +- ...ly_action_option_combination_parameters.py | 28 +- foundry/models/invalid_branch_id.py | 32 +- .../models/invalid_branch_id_parameters.py | 26 +- foundry/models/invalid_content_length.py | 30 +- foundry/models/invalid_content_type.py | 32 +- ...invalid_duration_group_by_property_type.py | 38 +- .../models/invalid_duration_group_by_value.py | 32 +- foundry/models/invalid_fields.py | 32 +- foundry/models/invalid_fields_parameters.py | 22 +- foundry/models/invalid_group_id.py | 32 +- foundry/models/invalid_group_id_parameters.py | 22 +- foundry/models/invalid_page_size.py | 32 +- .../models/invalid_page_size_parameters.py | 26 +- foundry/models/invalid_page_token.py | 32 +- .../models/invalid_page_token_parameters.py | 27 +- .../models/invalid_parameter_combination.py | 36 +- ...nvalid_parameter_combination_parameters.py | 26 +- foundry/models/invalid_parameter_value.py | 34 +- .../invalid_parameter_value_parameters.py | 49 +- .../models/invalid_property_filter_value.py | 38 +- ...nvalid_property_filter_value_parameters.py | 48 +- .../invalid_property_filters_combination.py | 36 +- ...property_filters_combination_parameters.py | 27 +- foundry/models/invalid_property_type.py | 34 +- .../invalid_property_type_parameters.py | 32 +- foundry/models/invalid_property_value.py | 34 +- .../invalid_property_value_parameters.py | 39 +- .../models/invalid_query_parameter_value.py | 38 +- ...nvalid_query_parameter_value_parameters.py | 37 +- foundry/models/invalid_range_query.py | 34 +- .../models/invalid_range_query_parameters.py | 30 +- foundry/models/invalid_sort_order.py | 34 +- .../models/invalid_sort_order_parameters.py | 22 +- foundry/models/invalid_sort_type.py | 32 +- .../models/invalid_sort_type_parameters.py | 22 +- foundry/models/invalid_transaction_type.py | 32 +- .../invalid_transaction_type_parameters.py | 32 +- foundry/models/invalid_user_id.py | 32 +- foundry/models/invalid_user_id_parameters.py | 22 +- foundry/models/language_model_source.py | 7 +- .../language_model_source_not_supported.py | 36 +- ...e_model_source_not_supported_parameters.py | 22 +- foundry/models/line_string.py | 37 +- foundry/models/link_already_exists.py | 32 +- foundry/models/link_type_not_found.py | 32 +- .../models/link_type_not_found_parameters.py | 32 +- foundry/models/link_type_side.py | 53 +- foundry/models/link_type_side_cardinality.py | 7 +- foundry/models/link_type_side_v2.py | 53 +- foundry/models/linked_object_not_found.py | 32 +- .../linked_object_not_found_parameters.py | 42 +- foundry/models/list_action_types_response.py | 30 +- .../models/list_action_types_response_v2.py | 30 +- foundry/models/list_branches_response.py | 34 +- foundry/models/list_deployments_response.py | 24 +- foundry/models/list_files_response.py | 30 +- foundry/models/list_object_types_response.py | 34 +- .../models/list_object_types_v2_response.py | 34 +- foundry/models/list_ontologies_response.py | 28 +- foundry/models/list_ontologies_v2_response.py | 28 +- .../list_outgoing_link_types_response.py | 34 +- .../list_outgoing_link_types_response_v2.py | 34 +- foundry/models/list_query_types_response.py | 30 +- .../models/list_query_types_response_v2.py | 30 +- foundry/models/logic_rule.py | 9 +- foundry/models/long_type.py | 22 +- foundry/models/malformed_property_filters.py | 34 +- .../malformed_property_filters_parameters.py | 22 +- .../marketplace_action_mapping_not_found.py | 36 +- ...ace_action_mapping_not_found_parameters.py | 27 +- .../marketplace_installation_not_found.py | 38 +- ...place_installation_not_found_parameters.py | 22 +- .../marketplace_link_mapping_not_found.py | 36 +- ...place_link_mapping_not_found_parameters.py | 36 +- .../marketplace_object_mapping_not_found.py | 36 +- ...ace_object_mapping_not_found_parameters.py | 27 +- .../marketplace_query_mapping_not_found.py | 36 +- ...lace_query_mapping_not_found_parameters.py | 26 +- foundry/models/missing_parameter.py | 34 +- .../models/missing_parameter_parameters.py | 22 +- foundry/models/missing_post_body.py | 30 +- foundry/models/model_api_data_type.py | 26 +- foundry/models/model_api_type.py | 137 +- foundry/models/model_property.py | 31 +- foundry/models/modify_object_rule.py | 27 +- foundry/models/multi_line_string.py | 40 +- foundry/models/multi_point.py | 31 +- foundry/models/multi_polygon.py | 42 +- ...ultiple_group_by_on_field_not_supported.py | 38 +- ...up_by_on_field_not_supported_parameters.py | 22 +- .../multiple_property_values_not_supported.py | 38 +- ...roperty_values_not_supported_parameters.py | 32 +- foundry/models/null_type.py | 22 +- foundry/models/object_already_exists.py | 32 +- foundry/models/object_changed.py | 32 +- foundry/models/object_not_found.py | 32 +- foundry/models/object_not_found_parameters.py | 28 +- foundry/models/object_property_type.py | 47 +- foundry/models/object_type.py | 64 +- foundry/models/object_type_not_found.py | 32 +- .../object_type_not_found_parameters.py | 34 +- foundry/models/object_type_not_synced.py | 34 +- .../object_type_not_synced_parameters.py | 27 +- foundry/models/object_type_v2.py | 63 +- foundry/models/object_type_visibility.py | 9 +- foundry/models/object_type_with_link.py | 26 +- foundry/models/objects_exceeded_limit.py | 32 +- foundry/models/ontology.py | 30 +- foundry/models/ontology_data_type.py | 145 +- .../models/ontology_edits_exceeded_limit.py | 38 +- ...ntology_edits_exceeded_limit_parameters.py | 22 +- foundry/models/ontology_full_metadata.py | 30 +- foundry/models/ontology_not_found.py | 32 +- .../models/ontology_not_found_parameters.py | 28 +- foundry/models/ontology_object_set_type.py | 34 +- foundry/models/ontology_object_type.py | 32 +- foundry/models/ontology_syncing.py | 34 +- foundry/models/ontology_v2.py | 30 +- .../models/open_transaction_already_exists.py | 32 +- foundry/models/operation_not_found.py | 32 +- .../models/operation_not_found_parameters.py | 22 +- foundry/models/parameter.py | 29 +- foundry/models/parameter_object_not_found.py | 34 +- .../parameter_object_not_found_parameters.py | 27 +- .../parameter_object_set_rid_not_found.py | 38 +- ...ter_object_set_rid_not_found_parameters.py | 22 +- .../models/parameter_type_not_supported.py | 38 +- ...parameter_type_not_supported_parameters.py | 32 +- foundry/models/parameters_not_found.py | 34 +- .../models/parameters_not_found_parameters.py | 41 +- .../parent_attachment_permission_denied.py | 32 +- foundry/models/polygon.py | 40 +- foundry/models/properties_not_filterable.py | 34 +- foundry/models/properties_not_found.py | 32 +- .../models/properties_not_found_parameters.py | 27 +- foundry/models/properties_not_searchable.py | 34 +- .../properties_not_searchable_parameters.py | 22 +- foundry/models/properties_not_sortable.py | 34 +- foundry/models/property_api_name_not_found.py | 34 +- .../property_api_name_not_found_parameters.py | 32 +- .../property_base_type_not_supported.py | 38 +- .../models/property_filters_not_supported.py | 38 +- .../property_types_search_not_supported.py | 38 +- ...y_types_search_not_supported_parameters.py | 22 +- foundry/models/property_v2.py | 28 +- .../models/put_schema_permission_denied.py | 32 +- foundry/models/query_aggregation_key_type.py | 17 +- .../query_aggregation_range_sub_type.py | 12 +- .../models/query_aggregation_range_type.py | 24 +- .../models/query_aggregation_value_type.py | 12 +- foundry/models/query_data_type.py | 142 +- .../query_encountered_user_facing_error.py | 38 +- foundry/models/query_memory_exceeded_limit.py | 34 +- foundry/models/query_not_found.py | 32 +- foundry/models/query_not_found_parameters.py | 22 +- foundry/models/query_parameter_v2.py | 24 +- foundry/models/query_time_exceeded_limit.py | 34 +- foundry/models/query_type.py | 44 +- foundry/models/query_type_v2.py | 44 +- .../models/read_table_permission_denied.py | 32 +- foundry/models/release_status.py | 9 +- .../models/resource_name_already_exists.py | 36 +- ...resource_name_already_exists_parameters.py | 22 +- foundry/models/return_edits_mode.py | 7 +- foundry/models/schema_not_found.py | 36 +- foundry/models/short_type.py | 22 +- foundry/models/string_type.py | 22 +- foundry/models/table_export_format.py | 9 +- .../models/three_dimensional_aggregation.py | 26 +- foundry/models/time_series_item_type.py | 4 +- foundry/models/timeseries_type.py | 24 +- foundry/models/timestamp_type.py | 22 +- foundry/models/transaction.py | 43 +- foundry/models/transaction_not_committed.py | 32 +- .../transaction_not_committed_parameters.py | 32 +- foundry/models/transaction_not_found.py | 36 +- foundry/models/transaction_not_open.py | 32 +- foundry/models/transaction_status.py | 11 +- foundry/models/transaction_type.py | 13 +- foundry/models/two_dimensional_aggregation.py | 26 +- foundry/models/unknown_distance_unit.py | 32 +- .../unknown_distance_unit_parameters.py | 22 +- foundry/models/unknown_parameter.py | 34 +- .../models/unknown_parameter_parameters.py | 22 +- foundry/models/unsupported_object_set.py | 30 +- foundry/models/unsupported_type.py | 22 +- .../models/upload_file_permission_denied.py | 32 +- .../models/view_object_permission_denied.py | 34 +- foundry/rest.py | 72 +- test/__init__.py | 1 - test/api/test_datasets_api_service_api.py | 4 +- test/models/test_create_dataset_request.py | 8 +- 300 files changed, 5507 insertions(+), 6502 deletions(-) diff --git a/foundry/api/__init__.py b/foundry/api/__init__.py index b78e6e4b0..4d4d04ad3 100644 --- a/foundry/api/__init__.py +++ b/foundry/api/__init__.py @@ -18,4 +18,3 @@ from foundry.api.datasets_api_service_api import DatasetsApiServiceApi from foundry.api.ontologies_api_service_api import OntologiesApiServiceApi from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi - diff --git a/foundry/api/datasets_api_service_api.py b/foundry/api/datasets_api_service_api.py index 9d1004d37..6277695da 100644 --- a/foundry/api/datasets_api_service_api.py +++ b/foundry/api/datasets_api_service_api.py @@ -71,20 +71,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def abort_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """abort_transaction - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -96,11 +100,9 @@ def abort_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -111,35 +113,24 @@ def abort_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -148,7 +139,7 @@ def abort_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -160,20 +151,24 @@ def abort_transaction( @handle_unexpected def commit_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """commit_transaction - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -185,11 +180,9 @@ def commit_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -200,35 +193,24 @@ def commit_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -237,7 +219,7 @@ def commit_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -249,20 +231,22 @@ def commit_transaction( @handle_unexpected def create_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to create the Branch." + ), + ], create_branch_request: CreateBranchRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Branch: """create_branch - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. (required) :type dataset_rid: str @@ -274,11 +258,9 @@ def create_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -289,7 +271,7 @@ def create_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters # process the header parameters # process the form parameters @@ -297,37 +279,21 @@ def create_branch( if create_branch_request is not None: _body_params = create_branch_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Branch" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/branches', + method="POST", + resource_path="/v1/datasets/{datasetRid}/branches", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -336,7 +302,7 @@ def create_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -352,15 +318,12 @@ def create_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Dataset: """create_dataset - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param create_dataset_request: (required) :type create_dataset_request: CreateDatasetRequest @@ -370,11 +333,9 @@ def create_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -391,37 +352,21 @@ def create_dataset( if create_dataset_request is not None: _body_params = create_dataset_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets', + method="POST", + resource_path="/v1/datasets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -430,7 +375,7 @@ def create_dataset( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -442,27 +387,34 @@ def create_dataset( @handle_unexpected def create_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to create the Transaction." + ), + ], create_transaction_request: CreateTransactionRequest, - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. " + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """create_transaction - Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. (required) :type dataset_rid: str :param create_transaction_request: (required) :type create_transaction_request: CreateTransactionRequest - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. :type branch_id: str :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -470,11 +422,9 @@ def create_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -485,49 +435,32 @@ def create_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + # process the header parameters # process the form parameters # process the body parameter if create_transaction_request is not None: _body_params = create_transaction_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -536,7 +469,7 @@ def create_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -548,20 +481,22 @@ def create_transaction( @handle_unexpected def delete_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Branch." + ), + ], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_branch - Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -573,11 +508,9 @@ def delete_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -588,28 +521,21 @@ def delete_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if branch_id is not None: - _path_params['branchId'] = branch_id + _path_params["branchId"] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} response_data = self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -618,7 +544,7 @@ def delete_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -630,22 +556,34 @@ def delete_branch( @handle_unexpected def delete_file( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to delete the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to delete the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments." + ), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field( + description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_file - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. (required) :type dataset_rid: str @@ -661,11 +599,9 @@ def delete_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -676,36 +612,27 @@ def delete_file( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} response_data = self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -714,7 +641,7 @@ def delete_file( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -726,28 +653,33 @@ def delete_file( @handle_unexpected def delete_schema( self, - dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to delete the schema. ")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The RID of the Transaction on which to delete the schema. ")] = None, + dataset_rid: Annotated[ + StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ") + ], + branch_id: Annotated[ + Optional[StrictStr], + Field(description="The ID of the Branch on which to delete the schema. "), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The RID of the Transaction on which to delete the schema. "), + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_schema - Deletes the Schema from a Dataset and Branch. + Deletes the Schema from a Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to delete the schema. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch on which to delete the schema. + :param branch_id: The ID of the Branch on which to delete the schema. :type branch_id: str - :param transaction_rid: The RID of the Transaction on which to delete the schema. + :param transaction_rid: The RID of the Transaction on which to delete the schema. :type transaction_rid: str :param preview: :type preview: bool @@ -757,11 +689,9 @@ def delete_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -772,38 +702,28 @@ def delete_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} response_data = self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/schema', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -812,7 +732,7 @@ def delete_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -824,20 +744,22 @@ def delete_schema( @handle_unexpected def get_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Branch." + ), + ], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Branch: """get_branch - Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -849,11 +771,9 @@ def get_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -864,35 +784,24 @@ def get_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if branch_id is not None: - _path_params['branchId'] = branch_id + _path_params["branchId"] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Branch" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -901,7 +810,7 @@ def get_branch( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -917,15 +826,12 @@ def get_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Dataset: """get_dataset - Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: (required) :type dataset_rid: str @@ -935,11 +841,9 @@ def get_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -950,33 +854,22 @@ def get_dataset( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}', + method="GET", + resource_path="/v1/datasets/{datasetRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -985,7 +878,7 @@ def get_dataset( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -997,23 +890,36 @@ def get_dataset( @handle_unexpected def get_file_content( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> bytearray: """get_file_content - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -1031,11 +937,9 @@ def get_file_content( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1046,47 +950,33 @@ def get_file_content( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - '*/*' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}/content', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1095,7 +985,7 @@ def get_file_content( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1107,23 +997,36 @@ def get_file_content( @handle_unexpected def get_file_metadata( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> File: """get_file_metadata - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -1141,11 +1044,9 @@ def get_file_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1156,47 +1057,33 @@ def get_file_metadata( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "File" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "File"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1205,7 +1092,7 @@ def get_file_metadata( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1218,27 +1105,28 @@ def get_file_metadata( def get_schema( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch. ")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], Field(description="The ID of the Branch. ") + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ") + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> object: """get_schema - Retrieves the Schema for a Dataset and Branch, if it exists. + Retrieves the Schema for a Dataset and Branch, if it exists. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch. + :param branch_id: The ID of the Branch. :type branch_id: str - :param transaction_rid: The TransactionRid that contains the Schema. + :param transaction_rid: The TransactionRid that contains the Schema. :type transaction_rid: str :param preview: :type preview: bool @@ -1248,11 +1136,9 @@ def get_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1263,46 +1149,31 @@ def get_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '204': None - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "object", "204": None} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/schema', + method="GET", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1311,7 +1182,7 @@ def get_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1323,20 +1194,24 @@ def get_schema( @handle_unexpected def get_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """get_transaction - Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -1348,11 +1223,9 @@ def get_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1363,35 +1236,24 @@ def get_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1400,7 +1262,7 @@ def get_transaction( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1412,25 +1274,32 @@ def get_transaction( @handle_unexpected def list_branches( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Branches.")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to list Branches." + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListBranchesResponse: """list_branches - Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. (required) :type dataset_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1440,11 +1309,9 @@ def list_branches( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1455,41 +1322,28 @@ def list_branches( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBranchesResponse" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "ListBranchesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/branches', + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1498,7 +1352,7 @@ def list_branches( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1510,24 +1364,42 @@ def list_branches( @handle_unexpected def list_files( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Files.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to list Files." + ), + ], + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListFilesResponse: """list_files - Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. (required) :type dataset_rid: str @@ -1537,7 +1409,7 @@ def list_files( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1547,11 +1419,9 @@ def list_files( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1562,53 +1432,37 @@ def list_files( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFilesResponse" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "ListFilesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1617,7 +1471,7 @@ def list_files( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1629,28 +1483,30 @@ def list_files( @handle_unexpected def put_schema( self, - dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ")], + dataset_rid: Annotated[ + StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ") + ], body: Dict[str, Any], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to put the Schema. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field(description="The ID of the Branch on which to put the Schema. "), + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """put_schema - Puts a Schema on an existing Dataset and Branch. + Puts a Schema on an existing Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to put the Schema. (required) :type dataset_rid: str :param body: (required) :type body: object - :param branch_id: The ID of the Branch on which to put the Schema. + :param branch_id: The ID of the Branch on which to put the Schema. :type branch_id: str :param preview: :type preview: bool @@ -1660,11 +1516,9 @@ def put_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1675,46 +1529,32 @@ def put_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter if body is not None: _body_params = body - - # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} response_data = self._api_client.call_api( - method='PUT', - resource_path='/v1/datasets/{datasetRid}/schema', + method="PUT", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1723,7 +1563,7 @@ def put_schema( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1736,25 +1576,47 @@ def put_schema( def read_table( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - format: Annotated[TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, - columns: Annotated[Optional[List[StrictStr]], Field(description="A subset of the dataset columns to include in the result. Defaults to all columns. ")] = None, - row_limit: Annotated[Optional[StrictInt], Field(description="A limit on the number of rows to return. Note that row ordering is non-deterministic. ")] = None, - preview: Annotated[Optional[StrictBool], Field(description="A boolean flag that, when set to true, enables the use of beta features in preview mode. ")] = None, + format: Annotated[ + TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ") + ], + branch_id: Annotated[ + Optional[StrictStr], Field(description="The identifier (name) of the Branch.") + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, + columns: Annotated[ + Optional[List[StrictStr]], + Field( + description="A subset of the dataset columns to include in the result. Defaults to all columns. " + ), + ] = None, + row_limit: Annotated[ + Optional[StrictInt], + Field( + description="A limit on the number of rows to return. Note that row ordering is non-deterministic. " + ), + ] = None, + preview: Annotated[ + Optional[StrictBool], + Field( + description="A boolean flag that, when set to true, enables the use of beta features in preview mode. " + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> bytearray: """read_table - :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str @@ -1766,11 +1628,11 @@ def read_table( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. :type columns: List[str] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. :type row_limit: int - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. :type preview: bool :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -1778,11 +1640,10 @@ def read_table( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _collection_formats: Dict[str, str] = { - - 'columns': 'multi', + "columns": "multi", } _path_params: Dict[str, str] = {} @@ -1794,61 +1655,43 @@ def read_table( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + if format is not None: - - _query_params.append(('format', format.value)) - + _query_params.append(("format", format.value)) + if columns is not None: - - _query_params.append(('columns', columns)) - + _query_params.append(("columns", columns)) + if row_limit is not None: - - _query_params.append(('rowLimit', row_limit)) - + _query_params.append(("rowLimit", row_limit)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - '*/*' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/readTable', + method="GET", + resource_path="/v1/datasets/{datasetRid}/readTable", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1857,7 +1700,7 @@ def read_table( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1869,24 +1712,41 @@ def read_table( @handle_unexpected def upload_file( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to upload the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to upload the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], body: Union[StrictBytes, StrictStr], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.")] = None, - transaction_type: Annotated[Optional[TransactionType], Field(description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`.")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open Transaction on which to upload the File.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments." + ), + ] = None, + transaction_type: Annotated[ + Optional[TransactionType], + Field( + description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`." + ), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field( + description="The Resource Identifier (RID) of the open Transaction on which to upload the File." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> File: """upload_file - Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. (required) :type dataset_rid: str @@ -1906,11 +1766,9 @@ def upload_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1921,24 +1779,20 @@ def upload_file( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if file_path is not None: - - _query_params.append(('filePath', file_path)) - + _query_params.append(("filePath", file_path)) + if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_type is not None: - - _query_params.append(('transactionType', transaction_type.value)) - + _query_params.append(("transactionType", transaction_type.value)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter @@ -1950,27 +1804,16 @@ def upload_file( else: _body_params = body - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "File" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "File"} response_data = self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/files:upload', + method="POST", + resource_path="/v1/datasets/{datasetRid}/files:upload", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1979,7 +1822,7 @@ def upload_file( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api/ontologies_api_service_api.py b/foundry/api/ontologies_api_service_api.py index cf3e1415a..021378b54 100644 --- a/foundry/api/ontologies_api_service_api.py +++ b/foundry/api/ontologies_api_service_api.py @@ -70,20 +70,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action type. ")], - action_type_api_name: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the action type. " + ), + ], + action_type_api_name: Annotated[ + StrictStr, Field(description="The name of the action type in the API. ") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ActionType: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. (required) :type ontology_rid: str @@ -95,11 +99,9 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -110,35 +112,24 @@ def get_action_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if action_type_api_name is not None: - _path_params['actionTypeApiName'] = action_type_api_name + _path_params["actionTypeApiName"] = action_type_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ActionType"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -147,7 +138,7 @@ def get_action_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -159,20 +150,27 @@ def get_action_type( @handle_unexpected def get_object_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ObjectType: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -184,11 +182,9 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -199,35 +195,24 @@ def get_object_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectType"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -236,7 +221,7 @@ def get_object_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -248,19 +233,21 @@ def get_object_type( @handle_unexpected def get_ontology( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Ontology: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -270,11 +257,9 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -285,33 +270,22 @@ def get_ontology( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Ontology" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "Ontology"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -320,7 +294,7 @@ def get_ontology( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -332,21 +306,33 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + link_type: Annotated[ + StrictStr, + Field( + description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> LinkTypeSide: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -360,11 +346,9 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -375,37 +359,26 @@ def get_outgoing_link_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type if link_type is not None: - _path_params['linkType'] = link_type + _path_params["linkType"] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LinkTypeSide" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSide"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -414,7 +387,7 @@ def get_outgoing_link_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -426,21 +399,28 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + query_api_name: Annotated[ + StrictStr, + Field( + description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " + ), + ], preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> QueryType: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -454,11 +434,9 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -469,39 +447,27 @@ def get_query_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if query_api_name is not None: - _path_params['queryApiName'] = query_api_name + _path_params["queryApiName"] = query_api_name # process the query parameters if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "QueryType"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -510,7 +476,7 @@ def get_query_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -522,25 +488,32 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListActionTypesResponse: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -550,11 +523,9 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -565,41 +536,28 @@ def list_action_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListActionTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/actionTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -608,7 +566,7 @@ def list_action_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -620,25 +578,32 @@ def list_action_types( @handle_unexpected def list_object_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListObjectTypesResponse: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -648,11 +613,9 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -663,41 +626,28 @@ def list_object_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListObjectTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -706,7 +656,7 @@ def list_object_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -721,15 +671,12 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOntologiesResponse: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -737,11 +684,9 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -756,27 +701,16 @@ def list_ontologies( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOntologiesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies', + method="GET", + resource_path="/v1/ontologies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -785,7 +719,7 @@ def list_ontologies( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -797,22 +731,31 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], Field(description="The desired size of the page to be returned.") + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOutgoingLinkTypesResponse: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -828,11 +771,9 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -843,43 +784,30 @@ def list_outgoing_link_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOutgoingLinkTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -888,7 +816,7 @@ def list_outgoing_link_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -900,26 +828,33 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListQueryTypesResponse: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -931,11 +866,9 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -946,45 +879,31 @@ def list_query_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListQueryTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/queryTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -993,7 +912,7 @@ def list_query_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api/ontologies_v2_api_service_api.py b/foundry/api/ontologies_v2_api_service_api.py index ed4d498c1..e16adadda 100644 --- a/foundry/api/ontologies_v2_api_service_api.py +++ b/foundry/api/ontologies_v2_api_service_api.py @@ -73,20 +73,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - action_type: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + action_type: Annotated[ + StrictStr, Field(description="The name of the action type in the API. ") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ActionTypeV2: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -98,11 +102,9 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -113,35 +115,24 @@ def get_action_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if action_type is not None: - _path_params['actionType'] = action_type + _path_params["actionType"] = action_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ActionTypeV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/actionTypes/{actionType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -150,7 +141,7 @@ def get_action_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -162,20 +153,27 @@ def get_action_type( @handle_unexpected def get_deployment( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - deployment: Annotated[StrictStr, Field(description="The API name of the deployment you want to fetch information about. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + deployment: Annotated[ + StrictStr, + Field( + description="The API name of the deployment you want to fetch information about. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> DeploymentMetadata: """get_deployment - Fetches information about a model deployment within a given Ontology. + Fetches information about a model deployment within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -187,11 +185,9 @@ def get_deployment( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -202,35 +198,24 @@ def get_deployment( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if deployment is not None: - _path_params['deployment'] = deployment + _path_params["deployment"] = deployment # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentMetadata" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "DeploymentMetadata"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/models/deployments/{deployment}', + method="GET", + resource_path="/v2/ontologies/{ontology}/models/deployments/{deployment}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -239,7 +224,7 @@ def get_deployment( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -251,20 +236,27 @@ def get_deployment( @handle_unexpected def get_object_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ObjectTypeV2: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -276,11 +268,9 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -291,35 +281,24 @@ def get_object_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectTypeV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -328,7 +307,7 @@ def get_object_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -340,19 +319,21 @@ def get_object_type( @handle_unexpected def get_ontology_full_metadata( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> OntologyFullMetadata: """get_ontology_full_metadata - Get the full Ontology metadata. This includes the objects, links, actions, and queries. + Get the full Ontology metadata. This includes the objects, links, actions, and queries. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -362,11 +343,9 @@ def get_ontology_full_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -377,33 +356,22 @@ def get_ontology_full_metadata( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OntologyFullMetadata" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyFullMetadata"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/fullMetadata', + method="GET", + resource_path="/v2/ontologies/{ontology}/fullMetadata", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -412,7 +380,7 @@ def get_ontology_full_metadata( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -424,19 +392,21 @@ def get_ontology_full_metadata( @handle_unexpected def get_ontology( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> OntologyV2: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -446,11 +416,9 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -461,33 +429,22 @@ def get_ontology( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OntologyV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}', + method="GET", + resource_path="/v2/ontologies/{ontology}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -496,7 +453,7 @@ def get_ontology( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -508,21 +465,33 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + link_type: Annotated[ + StrictStr, + Field( + description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> LinkTypeSideV2: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -536,11 +505,9 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -551,37 +518,26 @@ def get_outgoing_link_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type if link_type is not None: - _path_params['linkType'] = link_type + _path_params["linkType"] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LinkTypeSideV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSideV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -590,7 +546,7 @@ def get_outgoing_link_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -602,20 +558,27 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + query_api_name: Annotated[ + StrictStr, + Field( + description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> QueryTypeV2: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -627,11 +590,9 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -642,35 +603,24 @@ def get_query_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if query_api_name is not None: - _path_params['queryApiName'] = query_api_name + _path_params["queryApiName"] = query_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "QueryTypeV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/queryTypes/{queryApiName}', + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -679,7 +629,7 @@ def get_query_type( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -691,25 +641,32 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListActionTypesResponseV2: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -719,11 +676,9 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -734,41 +689,28 @@ def list_action_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListActionTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponseV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/actionTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -777,7 +719,7 @@ def list_action_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -789,19 +731,21 @@ def list_action_types( @handle_unexpected def list_deployments( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListDeploymentsResponse: """list_deployments - Fetches a list of the available model deployments within a given Ontology. + Fetches a list of the available model deployments within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -811,11 +755,9 @@ def list_deployments( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -826,33 +768,22 @@ def list_deployments( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDeploymentsResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListDeploymentsResponse"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/models/deployments', + method="GET", + resource_path="/v2/ontologies/{ontology}/models/deployments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -861,7 +792,7 @@ def list_deployments( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -873,25 +804,32 @@ def list_deployments( @handle_unexpected def list_object_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListObjectTypesV2Response: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -901,11 +839,9 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -916,41 +852,28 @@ def list_object_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListObjectTypesV2Response" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesV2Response"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -959,7 +882,7 @@ def list_object_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -974,15 +897,12 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOntologiesV2Response: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -990,11 +910,9 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1009,27 +927,16 @@ def list_ontologies( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOntologiesV2Response" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesV2Response"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies', + method="GET", + resource_path="/v2/ontologies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1038,7 +945,7 @@ def list_ontologies( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1050,22 +957,31 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], Field(description="The desired size of the page to be returned.") + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOutgoingLinkTypesResponseV2: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -1081,11 +997,9 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1096,43 +1010,30 @@ def list_outgoing_link_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOutgoingLinkTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponseV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1141,7 +1042,7 @@ def list_outgoing_link_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( @@ -1153,25 +1054,32 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListQueryTypesResponseV2: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1181,11 +1089,9 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1196,41 +1102,28 @@ def list_query_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListQueryTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponseV2"} response_data = self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/queryTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1239,7 +1132,7 @@ def list_query_types( files=_files, auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout + _request_timeout=_request_timeout, ) response_data.read() return self._api_client.response_deserialize( diff --git a/foundry/api_client.py b/foundry/api_client.py index 63c0d7ffa..0065c6846 100644 --- a/foundry/api_client.py +++ b/foundry/api_client.py @@ -81,14 +81,14 @@ class ApiClient: PRIMITIVE_TYPES = (float, bool, bytes, str, int) NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'object': object, + "int": int, + "long": int, # TODO remove as only py3 is supported? + "float": float, + "str": str, + "bool": bool, + "date": datetime.date, + "datetime": datetime.datetime, + "object": object, } _pool = None @@ -131,7 +131,7 @@ def call_api( files=None, auth_settings=None, collection_formats=None, - _request_timeout=None + _request_timeout=None, ) -> rest.RESTResponse: """Makes the HTTP request (synchronous) :param method: Method to call. @@ -157,30 +157,21 @@ def call_api( headers = header_params or {} headers.update(self.default_headers) if self.cookie: - headers['Cookie'] = self.cookie + headers["Cookie"] = self.cookie # path parameters if path_params: path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) + path_params = self.parameters_to_tuples(path_params, collection_formats) for k, v in path_params: # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v)) - ) + resource_path = resource_path.replace("{%s}" % k, quote(str(v))) # post parameters if post_params or files: post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) + post_params = self.parameters_to_tuples(post_params, collection_formats) post_params.extend(self.files_parameters(files)) # body @@ -192,16 +183,13 @@ def call_api( # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) + url_query = self.parameters_to_url_query(query_params, collection_formats) url += "?" + url_query def send_request(token: Optional[Token]): if token is not None: headers["Authorization"] = "Bearer " + token.access_token - + return self.rest_client.request( method, url, @@ -228,7 +216,11 @@ def response_deserialize( """ response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + if ( + not response_type + and isinstance(response_data.status, int) + and 100 <= response_data.status <= 599 + ): # if not found, look for '1XX', '2XX', etc. response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) @@ -265,7 +257,7 @@ def response_deserialize( return_data = self.__deserialize_file(response_data) else: match = None - content_type = response_data.getheader('content-type') + content_type = response_data.getheader("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" @@ -274,10 +266,10 @@ def response_deserialize( return_data = self.deserialize(response_text, response_type) return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.getheaders(), # type: ignore - raw_data = response_data.data + status_code=response_data.status, + data=return_data, + headers=response_data.getheaders(), # type: ignore + raw_data=response_data.data, ) def sanitize_for_serialization(self, obj): @@ -299,13 +291,9 @@ def sanitize_for_serialization(self, obj): elif isinstance(obj, self.PRIMITIVE_TYPES): return obj elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] + return [self.sanitize_for_serialization(sub_obj) for sub_obj in obj] elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) + return tuple(self.sanitize_for_serialization(sub_obj) for sub_obj in obj) elif isinstance(obj, (datetime.datetime, datetime.date)): return obj.isoformat() @@ -319,10 +307,7 @@ def sanitize_for_serialization(self, obj): # model definition for request. obj_dict = obj.to_dict() - return { - key: self.sanitize_for_serialization(val) - for key, val in obj_dict.items() - } + return {key: self.sanitize_for_serialization(val) for key, val in obj_dict.items()} def deserialize(self, response_text, response_type): """Deserializes response into an object. @@ -354,21 +339,19 @@ def __deserialize(self, data, klass): return None if isinstance(klass, str): - if klass.startswith('List['): + if klass.startswith("List["): sub_kls = error_if_none( re.match(r"List\[(.*)]", klass), error_message="Failed to fetch inner contents of List[].", ).group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] + return [self.__deserialize(sub_data, sub_kls) for sub_data in data] - if klass.startswith('Dict['): + if klass.startswith("Dict["): sub_kls = error_if_none( re.match(r"Dict\[([^,]*), (.*)]", klass), error_message="Failed to fetch inner contents of Dict[].", ).group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} + return {k: self.__deserialize(v, sub_kls) for k, v in data.items()} # convert str to class if klass in self.NATIVE_TYPES_MAPPING: @@ -400,19 +383,18 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) + delimiter = "," + new_params.append((k, delimiter.join(str(value) for value in v))) else: new_params.append((k, v)) return new_params @@ -437,20 +419,18 @@ def parameters_to_url_query(self, params, collection_formats): if k in collection_formats: collection_format = collection_formats[k] - if collection_format == 'multi': + if collection_format == "multi": new_params.extend((k, value) for value in v) else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' + if collection_format == "ssv": + delimiter = " " + elif collection_format == "tsv": + delimiter = "\t" + elif collection_format == "pipes": + delimiter = "|" else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) + delimiter = "," + new_params.append((k, delimiter.join(quote(str(value)) for value in v))) else: new_params.append((k, quote(str(v)))) @@ -470,16 +450,11 @@ def files_parameters(self, files=None): continue file_names = v if type(v) is list else [v] for n in file_names: - with open(n, 'rb') as f: + with open(n, "rb") as f: filename = os.path.basename(f.name) filedata = f.read() - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([k, tuple([filename, filedata, mimetype])])) return params @@ -493,7 +468,7 @@ def select_header_accept(self, accepts: List[str]) -> Optional[str]: return None for accept in accepts: - if re.search('json', accept, re.IGNORECASE): + if re.search("json", accept, re.IGNORECASE): return accept return accepts[0] @@ -508,7 +483,7 @@ def select_header_content_type(self, content_types): return None for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): + if re.search("json", content_type, re.IGNORECASE): return content_type return content_types[0] @@ -602,7 +577,7 @@ def __deserialize_model(self, data, klass): # First, check if this is a class model. If so, we can just use the # "from_dict" method. - # If it isn't a class, check if there is an available type adapter we can use. + # If it isn't a class, check if there is an available type adapter we can use. # We need type adapters ince some types (e.g. unions cannot natively validated). if hasattr(klass, "from_dict"): return klass.from_dict(data, allow_extra=True) @@ -614,6 +589,7 @@ def __deserialize_model(self, data, klass): T = TypeVar("T") + def error_if_none(o: Optional[T], error_message: str) -> T: if o is None: raise SDKInternalError(error_message) diff --git a/foundry/api_response.py b/foundry/api_response.py index ea6abb978..287dd06dc 100644 --- a/foundry/api_response.py +++ b/foundry/api_response.py @@ -20,6 +20,7 @@ T = TypeVar("T") + class ApiResponse(BaseModel, Generic[T]): """ API response object @@ -30,6 +31,4 @@ class ApiResponse(BaseModel, Generic[T]): data: T = Field(description="Deserialized data given the data type") raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - model_config = { - "arbitrary_types_allowed": True - } + model_config = {"arbitrary_types_allowed": True} diff --git a/foundry/configuration.py b/foundry/configuration.py index bfb02d22f..c7273d55e 100644 --- a/foundry/configuration.py +++ b/foundry/configuration.py @@ -49,7 +49,7 @@ def __init__(self, auth: Auth) -> None: self.logger["urllib3_logger"] = logging.getLogger("urllib3") """Log format""" - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log stream handler""" self.logger_stream_handler = None @@ -63,7 +63,6 @@ def __init__(self, auth: Auth) -> None: """Debug file location""" self.debug = False - """Adding retries to override urllib3 default value 3""" self.retries = None diff --git a/foundry/exceptions.py b/foundry/exceptions.py index 8c52c5710..9564c4a42 100644 --- a/foundry/exceptions.py +++ b/foundry/exceptions.py @@ -42,6 +42,7 @@ from pydantic_core import __version__ as __pydantic_core__version__ from pydantic import ValidationError + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" @@ -53,7 +54,7 @@ def __init__(self, msg: str) -> None: def __str__(self): message = self.msg - sys_version = sys.version.replace('\n', ' ') + sys_version = sys.version.replace("\n", " ") message += ( "\n\nThis is an unexpected issue and should be reported. " "When filing an issue, make sure to copy the package information " @@ -63,9 +64,9 @@ def __str__(self): f"SDK Version: {__version__}\n" f"OpenAPI Document Version: {__openapi_document_version__}\n" f"OpenAPI Specification Version: {__openapi_specification_version__}\n" - f"OpenAPI Generator Version: {__openapi_generator_version__}\n" - f"Pydantic Version: {__pydantic__version__}\n" - f"Pydantic Core Version: {__pydantic_core__version__}\n" + f"OpenAPI Generator Version: {__openapi_generator_version__}\n" + f"Pydantic Version: {__pydantic__version__}\n" + f"Pydantic Core Version: {__pydantic_core__version__}\n" ) return message @@ -167,7 +168,7 @@ def __init__( self.json = json.loads(self.body or "") except Exception as e: raise SDKInternalError(f"Unable to parse error body: {self.body}") - + try: self.error_code = self.json["errorCode"] self.error_name = self.json["errorName"] @@ -187,6 +188,7 @@ def __str__(self): return error_message + class BadRequestException(ApiException): pass @@ -217,6 +219,7 @@ def render_path(path_to_item): result += "['{0}']".format(pth) return result + # Delayed import since the rest module imports exceptions from the module from foundry.rest import RESTResponse from foundry.rest import Urllib3Response diff --git a/foundry/models/__init__.py b/foundry/models/__init__.py index 9bc805307..19f4cc5a3 100644 --- a/foundry/models/__init__.py +++ b/foundry/models/__init__.py @@ -29,14 +29,18 @@ # import models into model package from foundry.models.abort_transaction_permission_denied import AbortTransactionPermissionDenied -from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters +from foundry.models.abort_transaction_permission_denied_parameters import ( + AbortTransactionPermissionDeniedParameters, +) from foundry.models.action_contains_duplicate_edits import ActionContainsDuplicateEdits from foundry.models.action_edited_properties_not_found import ActionEditedPropertiesNotFound from foundry.models.action_not_found import ActionNotFound from foundry.models.action_not_found_parameters import ActionNotFoundParameters from foundry.models.action_parameter_type import ActionParameterArrayType from foundry.models.action_parameter_object_not_found import ActionParameterObjectNotFound -from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters +from foundry.models.action_parameter_object_not_found_parameters import ( + ActionParameterObjectNotFoundParameters, +) from foundry.models.action_parameter_object_type_not_found import ActionParameterObjectTypeNotFound from foundry.models.action_parameter_type import ActionParameterType from foundry.models.action_parameter_v2 import ActionParameterV2 @@ -47,7 +51,9 @@ from foundry.models.action_validation_failed import ActionValidationFailed from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters from foundry.models.aggregation_group_count_exceeded_limit import AggregationGroupCountExceededLimit -from foundry.models.aggregation_group_count_exceeded_limit_parameters import AggregationGroupCountExceededLimitParameters +from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( + AggregationGroupCountExceededLimitParameters, +) from foundry.models.any_type import AnyType from foundry.models.api_feature_preview_usage_only import ApiFeaturePreviewUsageOnly from foundry.models.api_usage_denied import ApiUsageDenied @@ -58,7 +64,9 @@ from foundry.models.attachment_not_found import AttachmentNotFound from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters from foundry.models.attachment_size_exceeded_limit import AttachmentSizeExceededLimit -from foundry.models.attachment_size_exceeded_limit_parameters import AttachmentSizeExceededLimitParameters +from foundry.models.attachment_size_exceeded_limit_parameters import ( + AttachmentSizeExceededLimitParameters, +) from foundry.models.attachment_type import AttachmentType from foundry.models.binary_type import BinaryType from foundry.models.boolean_type import BooleanType @@ -71,11 +79,15 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from foundry.models.commit_transaction_permission_denied import CommitTransactionPermissionDenied from foundry.models.composite_primary_key_not_supported import CompositePrimaryKeyNotSupported -from foundry.models.composite_primary_key_not_supported_parameters import CompositePrimaryKeyNotSupportedParameters +from foundry.models.composite_primary_key_not_supported_parameters import ( + CompositePrimaryKeyNotSupportedParameters, +) from foundry.models.create_branch_permission_denied import CreateBranchPermissionDenied from foundry.models.create_branch_request import CreateBranchRequest from foundry.models.create_dataset_permission_denied import CreateDatasetPermissionDenied -from foundry.models.create_dataset_permission_denied_parameters import CreateDatasetPermissionDeniedParameters +from foundry.models.create_dataset_permission_denied_parameters import ( + CreateDatasetPermissionDeniedParameters, +) from foundry.models.create_dataset_request import CreateDatasetRequest from foundry.models.create_link_rule import CreateLinkRule from foundry.models.create_object_rule import CreateObjectRule @@ -89,7 +101,9 @@ from foundry.models.delete_link_rule import DeleteLinkRule from foundry.models.delete_object_rule import DeleteObjectRule from foundry.models.delete_schema_permission_denied import DeleteSchemaPermissionDenied -from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters +from foundry.models.delete_schema_permission_denied_parameters import ( + DeleteSchemaPermissionDeniedParameters, +) from foundry.models.deployment_api import DeploymentApi from foundry.models.deployment_listing import DeploymentListing from foundry.models.deployment_metadata import DeploymentMetadata @@ -108,12 +122,16 @@ from foundry.models.file_not_found_on_branch import FileNotFoundOnBranch from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters from foundry.models.file_not_found_on_transaction_range import FileNotFoundOnTransactionRange -from foundry.models.file_not_found_on_transaction_range_parameters import FileNotFoundOnTransactionRangeParameters +from foundry.models.file_not_found_on_transaction_range_parameters import ( + FileNotFoundOnTransactionRangeParameters, +) from foundry.models.float_type import FloatType from foundry.models.folder_not_found import FolderNotFound from foundry.models.folder_not_found_parameters import FolderNotFoundParameters from foundry.models.function_encountered_user_facing_error import FunctionEncounteredUserFacingError -from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters +from foundry.models.function_encountered_user_facing_error_parameters import ( + FunctionEncounteredUserFacingErrorParameters, +) from foundry.models.function_execution_failed import FunctionExecutionFailed from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from foundry.models.function_execution_timed_out import FunctionExecutionTimedOut @@ -125,16 +143,26 @@ from foundry.models.geometry import GeometryCollection from foundry.models.integer_type import IntegerType from foundry.models.invalid_aggregation_range import InvalidAggregationRange -from foundry.models.invalid_aggregation_range_property_type import InvalidAggregationRangePropertyType -from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters +from foundry.models.invalid_aggregation_range_property_type import ( + InvalidAggregationRangePropertyType, +) +from foundry.models.invalid_aggregation_range_property_type_parameters import ( + InvalidAggregationRangePropertyTypeParameters, +) from foundry.models.invalid_aggregation_range_value import InvalidAggregationRangeValue -from foundry.models.invalid_apply_action_option_combination import InvalidApplyActionOptionCombination -from foundry.models.invalid_apply_action_option_combination_parameters import InvalidApplyActionOptionCombinationParameters +from foundry.models.invalid_apply_action_option_combination import ( + InvalidApplyActionOptionCombination, +) +from foundry.models.invalid_apply_action_option_combination_parameters import ( + InvalidApplyActionOptionCombinationParameters, +) from foundry.models.invalid_branch_id import InvalidBranchId from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters from foundry.models.invalid_content_length import InvalidContentLength from foundry.models.invalid_content_type import InvalidContentType -from foundry.models.invalid_duration_group_by_property_type import InvalidDurationGroupByPropertyType +from foundry.models.invalid_duration_group_by_property_type import ( + InvalidDurationGroupByPropertyType, +) from foundry.models.invalid_duration_group_by_value import InvalidDurationGroupByValue from foundry.models.invalid_fields import InvalidFields from foundry.models.invalid_fields_parameters import InvalidFieldsParameters @@ -145,19 +173,27 @@ from foundry.models.invalid_page_token import InvalidPageToken from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters from foundry.models.invalid_parameter_combination import InvalidParameterCombination -from foundry.models.invalid_parameter_combination_parameters import InvalidParameterCombinationParameters +from foundry.models.invalid_parameter_combination_parameters import ( + InvalidParameterCombinationParameters, +) from foundry.models.invalid_parameter_value import InvalidParameterValue from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters from foundry.models.invalid_property_filter_value import InvalidPropertyFilterValue -from foundry.models.invalid_property_filter_value_parameters import InvalidPropertyFilterValueParameters +from foundry.models.invalid_property_filter_value_parameters import ( + InvalidPropertyFilterValueParameters, +) from foundry.models.invalid_property_filters_combination import InvalidPropertyFiltersCombination -from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters +from foundry.models.invalid_property_filters_combination_parameters import ( + InvalidPropertyFiltersCombinationParameters, +) from foundry.models.invalid_property_type import InvalidPropertyType from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters from foundry.models.invalid_property_value import InvalidPropertyValue from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters from foundry.models.invalid_query_parameter_value import InvalidQueryParameterValue -from foundry.models.invalid_query_parameter_value_parameters import InvalidQueryParameterValueParameters +from foundry.models.invalid_query_parameter_value_parameters import ( + InvalidQueryParameterValueParameters, +) from foundry.models.invalid_range_query import InvalidRangeQuery from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters from foundry.models.invalid_sort_order import InvalidSortOrder @@ -170,7 +206,9 @@ from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters from foundry.models.language_model_source import LanguageModelSource from foundry.models.language_model_source_not_supported import LanguageModelSourceNotSupported -from foundry.models.language_model_source_not_supported_parameters import LanguageModelSourceNotSupportedParameters +from foundry.models.language_model_source_not_supported_parameters import ( + LanguageModelSourceNotSupportedParameters, +) from foundry.models.line_string import LineString from foundry.models.link_already_exists import LinkAlreadyExists from foundry.models.link_type_not_found import LinkTypeNotFound @@ -198,15 +236,25 @@ from foundry.models.malformed_property_filters import MalformedPropertyFilters from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters from foundry.models.marketplace_action_mapping_not_found import MarketplaceActionMappingNotFound -from foundry.models.marketplace_action_mapping_not_found_parameters import MarketplaceActionMappingNotFoundParameters +from foundry.models.marketplace_action_mapping_not_found_parameters import ( + MarketplaceActionMappingNotFoundParameters, +) from foundry.models.marketplace_installation_not_found import MarketplaceInstallationNotFound -from foundry.models.marketplace_installation_not_found_parameters import MarketplaceInstallationNotFoundParameters +from foundry.models.marketplace_installation_not_found_parameters import ( + MarketplaceInstallationNotFoundParameters, +) from foundry.models.marketplace_link_mapping_not_found import MarketplaceLinkMappingNotFound -from foundry.models.marketplace_link_mapping_not_found_parameters import MarketplaceLinkMappingNotFoundParameters +from foundry.models.marketplace_link_mapping_not_found_parameters import ( + MarketplaceLinkMappingNotFoundParameters, +) from foundry.models.marketplace_object_mapping_not_found import MarketplaceObjectMappingNotFound -from foundry.models.marketplace_object_mapping_not_found_parameters import MarketplaceObjectMappingNotFoundParameters +from foundry.models.marketplace_object_mapping_not_found_parameters import ( + MarketplaceObjectMappingNotFoundParameters, +) from foundry.models.marketplace_query_mapping_not_found import MarketplaceQueryMappingNotFound -from foundry.models.marketplace_query_mapping_not_found_parameters import MarketplaceQueryMappingNotFoundParameters +from foundry.models.marketplace_query_mapping_not_found_parameters import ( + MarketplaceQueryMappingNotFoundParameters, +) from foundry.models.missing_parameter import MissingParameter from foundry.models.missing_parameter_parameters import MissingParameterParameters from foundry.models.missing_post_body import MissingPostBody @@ -222,10 +270,16 @@ from foundry.models.multi_line_string import MultiLineString from foundry.models.multi_point import MultiPoint from foundry.models.multi_polygon import MultiPolygon -from foundry.models.multiple_group_by_on_field_not_supported import MultipleGroupByOnFieldNotSupported -from foundry.models.multiple_group_by_on_field_not_supported_parameters import MultipleGroupByOnFieldNotSupportedParameters +from foundry.models.multiple_group_by_on_field_not_supported import ( + MultipleGroupByOnFieldNotSupported, +) +from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( + MultipleGroupByOnFieldNotSupportedParameters, +) from foundry.models.multiple_property_values_not_supported import MultiplePropertyValuesNotSupported -from foundry.models.multiple_property_values_not_supported_parameters import MultiplePropertyValuesNotSupportedParameters +from foundry.models.multiple_property_values_not_supported_parameters import ( + MultiplePropertyValuesNotSupportedParameters, +) from foundry.models.null_type import NullType from foundry.models.object_already_exists import ObjectAlreadyExists from foundry.models.object_changed import ObjectChanged @@ -245,7 +299,9 @@ from foundry.models.ontology_data_type import OntologyArrayType from foundry.models.ontology_data_type import OntologyDataType from foundry.models.ontology_edits_exceeded_limit import OntologyEditsExceededLimit -from foundry.models.ontology_edits_exceeded_limit_parameters import OntologyEditsExceededLimitParameters +from foundry.models.ontology_edits_exceeded_limit_parameters import ( + OntologyEditsExceededLimitParameters, +) from foundry.models.ontology_full_metadata import OntologyFullMetadata from foundry.models.ontology_data_type import OntologyMapType from foundry.models.ontology_not_found import OntologyNotFound @@ -265,9 +321,13 @@ from foundry.models.parameter_object_not_found import ParameterObjectNotFound from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters from foundry.models.parameter_object_set_rid_not_found import ParameterObjectSetRidNotFound -from foundry.models.parameter_object_set_rid_not_found_parameters import ParameterObjectSetRidNotFoundParameters +from foundry.models.parameter_object_set_rid_not_found_parameters import ( + ParameterObjectSetRidNotFoundParameters, +) from foundry.models.parameter_type_not_supported import ParameterTypeNotSupported -from foundry.models.parameter_type_not_supported_parameters import ParameterTypeNotSupportedParameters +from foundry.models.parameter_type_not_supported_parameters import ( + ParameterTypeNotSupportedParameters, +) from foundry.models.parameters_not_found import ParametersNotFound from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters from foundry.models.parent_attachment_permission_denied import ParentAttachmentPermissionDenied @@ -283,7 +343,9 @@ from foundry.models.property_base_type_not_supported import PropertyBaseTypeNotSupported from foundry.models.property_filters_not_supported import PropertyFiltersNotSupported from foundry.models.property_types_search_not_supported import PropertyTypesSearchNotSupported -from foundry.models.property_types_search_not_supported_parameters import PropertyTypesSearchNotSupportedParameters +from foundry.models.property_types_search_not_supported_parameters import ( + PropertyTypesSearchNotSupportedParameters, +) from foundry.models.property_v2 import PropertyV2 from foundry.models.put_schema_permission_denied import PutSchemaPermissionDenied from foundry.models.query_aggregation_key_type import QueryAggregationKeyType @@ -307,7 +369,9 @@ from foundry.models.read_table_permission_denied import ReadTablePermissionDenied from foundry.models.release_status import ReleaseStatus from foundry.models.resource_name_already_exists import ResourceNameAlreadyExists -from foundry.models.resource_name_already_exists_parameters import ResourceNameAlreadyExistsParameters +from foundry.models.resource_name_already_exists_parameters import ( + ResourceNameAlreadyExistsParameters, +) from foundry.models.return_edits_mode import ReturnEditsMode from foundry.models.schema_not_found import SchemaNotFound from foundry.models.short_type import ShortType diff --git a/foundry/models/abort_transaction_permission_denied.py b/foundry/models/abort_transaction_permission_denied.py index 04ac84c7e..9b3ebe1a5 100644 --- a/foundry/models/abort_transaction_permission_denied.py +++ b/foundry/models/abort_transaction_permission_denied.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters +from foundry.models.abort_transaction_permission_denied_parameters import ( + AbortTransactionPermissionDeniedParameters, +) from typing_extensions import Self + class AbortTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to abort the given treansaction on the given dataset. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/abort_transaction_permission_denied_parameters.py b/foundry/models/abort_transaction_permission_denied_parameters.py index b3c1de6a5..89968491b 100644 --- a/foundry/models/abort_transaction_permission_denied_parameters.py +++ b/foundry/models/abort_transaction_permission_denied_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class AbortTransactionPermissionDeniedParameters(BaseModel): """ AbortTransactionPermissionDeniedParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_contains_duplicate_edits.py b/foundry/models/action_contains_duplicate_edits.py index 72e48a5d5..a891efb5e 100644 --- a/foundry/models/action_contains_duplicate_edits.py +++ b/foundry/models/action_contains_duplicate_edits.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ActionContainsDuplicateEdits(BaseModel): """ The given action request has multiple edits on the same object. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_edited_properties_not_found.py b/foundry/models/action_edited_properties_not_found.py index dfd15689d..2c39dd26d 100644 --- a/foundry/models/action_edited_properties_not_found.py +++ b/foundry/models/action_edited_properties_not_found.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ActionEditedPropertiesNotFound(BaseModel): """ - Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. - """ # noqa: E501 + Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_not_found.py b/foundry/models/action_not_found.py index ecbc351e0..8ceec7a04 100644 --- a/foundry/models/action_not_found.py +++ b/foundry/models/action_not_found.py @@ -38,29 +38,28 @@ from foundry.models.action_not_found_parameters import ActionNotFoundParameters from typing_extensions import Self + class ActionNotFound(BaseModel): """ The action is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_not_found_parameters.py b/foundry/models/action_not_found_parameters.py index 6bf1a6546..1d9dbea66 100644 --- a/foundry/models/action_not_found_parameters.py +++ b/foundry/models/action_not_found_parameters.py @@ -37,19 +37,18 @@ from pydantic import Field from typing_extensions import Self + class ActionNotFoundParameters(BaseModel): """ ActionNotFoundParameters - """ # noqa: E501 - action_rid: StrictStr = Field(description="The unique resource identifier for an action.", alias="actionRid") - __properties: ClassVar[Set[str]] = set(("actionRid")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + action_rid: StrictStr = Field( + description="The unique resource identifier for an action.", alias="actionRid" + ) + __properties: ClassVar[Set[str]] = set(("actionRid")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +90,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_parameter_object_not_found.py b/foundry/models/action_parameter_object_not_found.py index 8ccafdf10..91bcb8568 100644 --- a/foundry/models/action_parameter_object_not_found.py +++ b/foundry/models/action_parameter_object_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters +from foundry.models.action_parameter_object_not_found_parameters import ( + ActionParameterObjectNotFoundParameters, +) from typing_extensions import Self + class ActionParameterObjectNotFound(BaseModel): """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 + The parameter object reference or parameter default value is not found, or the client token does not have access to it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_parameter_object_not_found_parameters.py b/foundry/models/action_parameter_object_not_found_parameters.py index 5a08af5e9..2c239aca5 100644 --- a/foundry/models/action_parameter_object_not_found_parameters.py +++ b/foundry/models/action_parameter_object_not_found_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self + class ActionParameterObjectNotFoundParameters(BaseModel): """ ActionParameterObjectNotFoundParameters - """ # noqa: E501 - parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") - __properties: ClassVar[Set[str]] = set(("parameterId")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + parameter_id: StrictStr = Field( + description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", + alias="parameterId", + ) + __properties: ClassVar[Set[str]] = set(("parameterId")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_parameter_object_type_not_found.py b/foundry/models/action_parameter_object_type_not_found.py index 4ebd1900b..a45b5f511 100644 --- a/foundry/models/action_parameter_object_type_not_found.py +++ b/foundry/models/action_parameter_object_type_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ActionParameterObjectNotFoundParameters +from foundry.models.action_parameter_object_not_found_parameters import ( + ActionParameterObjectNotFoundParameters, +) from typing_extensions import Self + class ActionParameterObjectTypeNotFound(BaseModel): """ - The parameter references an object type that could not be found, or the client token does not have access to it. - """ # noqa: E501 + The parameter references an object type that could not be found, or the client token does not have access to it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_parameter_type.py b/foundry/models/action_parameter_type.py index d3047d036..4382384ba 100644 --- a/foundry/models/action_parameter_type.py +++ b/foundry/models/action_parameter_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -57,17 +58,13 @@ class ActionParameterArrayType(BaseModel): """ ActionParameterArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ActionParameterType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -95,13 +92,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -113,14 +109,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ActionParameterArrayType.model_rebuild(raise_errors=False) @@ -128,9 +125,22 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Action parameters. """ -ActionParameterType = Annotated[Union[ActionParameterArrayType, AttachmentType, BooleanType, DateType, DoubleType, IntegerType, LongType, OntologyObjectSetType, OntologyObjectType, StringType, TimestampType], Field(discriminator="type")] - - +ActionParameterType = Annotated[ + Union[ + ActionParameterArrayType, + AttachmentType, + BooleanType, + DateType, + DoubleType, + IntegerType, + LongType, + OntologyObjectSetType, + OntologyObjectType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/action_parameter_v2.py b/foundry/models/action_parameter_v2.py index fd2e2b039..a8cf43560 100644 --- a/foundry/models/action_parameter_v2.py +++ b/foundry/models/action_parameter_v2.py @@ -38,21 +38,18 @@ from foundry.models.action_parameter_type import ActionParameterType from typing_extensions import Self + class ActionParameterV2(BaseModel): """ Details about a parameter of an action. - """ # noqa: E501 + """ # noqa: E501 + data_type: ActionParameterType = Field(alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("dataType", "description", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +77,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -98,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type.py b/foundry/models/action_type.py index 2dea4d907..1a2ae8b78 100644 --- a/foundry/models/action_type.py +++ b/foundry/models/action_type.py @@ -40,25 +40,31 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ActionType(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") + rid: StrictStr = Field( + description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -96,14 +101,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict['operations'] = _items + _dict["operations"] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -115,12 +120,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type_not_found.py b/foundry/models/action_type_not_found.py index b4758ff0f..bf51a0561 100644 --- a/foundry/models/action_type_not_found.py +++ b/foundry/models/action_type_not_found.py @@ -38,29 +38,28 @@ from foundry.models.action_type_not_found_parameters import ActionTypeNotFoundParameters from typing_extensions import Self + class ActionTypeNotFound(BaseModel): """ The action type is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type_not_found_parameters.py b/foundry/models/action_type_not_found_parameters.py index 490b32272..454b740d3 100644 --- a/foundry/models/action_type_not_found_parameters.py +++ b/foundry/models/action_type_not_found_parameters.py @@ -37,20 +37,24 @@ from pydantic import Field from typing_extensions import Self + class ActionTypeNotFoundParameters(BaseModel): """ ActionTypeNotFoundParameters - """ # noqa: E501 - action_type: Optional[StrictStr] = Field(default=None, description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") - rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") + """ # noqa: E501 + + action_type: Optional[StrictStr] = Field( + default=None, + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="actionType", + ) + rid: Optional[StrictStr] = Field( + default=None, + description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ", + ) __properties: ClassVar[Set[str]] = set(("actionType", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type_v2.py b/foundry/models/action_type_v2.py index 89dc9d56b..e3aa44e3e 100644 --- a/foundry/models/action_type_v2.py +++ b/foundry/models/action_type_v2.py @@ -40,25 +40,31 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ActionTypeV2(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, ActionParameterV2]] = None - rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") + rid: StrictStr = Field( + description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -96,14 +101,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict['operations'] = _items + _dict["operations"] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -115,12 +120,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_validation_failed.py b/foundry/models/action_validation_failed.py index 4f1a47b20..29a6353e1 100644 --- a/foundry/models/action_validation_failed.py +++ b/foundry/models/action_validation_failed.py @@ -38,29 +38,28 @@ from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters from typing_extensions import Self + class ActionValidationFailed(BaseModel): """ - The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. - """ # noqa: E501 + The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ActionValidationFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_validation_failed_parameters.py b/foundry/models/action_validation_failed_parameters.py index e18182acf..e8aad9946 100644 --- a/foundry/models/action_validation_failed_parameters.py +++ b/foundry/models/action_validation_failed_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self + class ActionValidationFailedParameters(BaseModel): """ ActionValidationFailedParameters - """ # noqa: E501 - action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") - __properties: ClassVar[Set[str]] = set(("actionType")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + action_type: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="actionType", + ) + __properties: ClassVar[Set[str]] = set(("actionType")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/aggregation_group_count_exceeded_limit.py b/foundry/models/aggregation_group_count_exceeded_limit.py index 83f316a45..625d67d1a 100644 --- a/foundry/models/aggregation_group_count_exceeded_limit.py +++ b/foundry/models/aggregation_group_count_exceeded_limit.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.aggregation_group_count_exceeded_limit_parameters import AggregationGroupCountExceededLimitParameters +from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( + AggregationGroupCountExceededLimitParameters, +) from typing_extensions import Self + class AggregationGroupCountExceededLimit(BaseModel): """ - The number of groups in the aggregations grouping exceeded the allowed limit. - """ # noqa: E501 + The number of groups in the aggregations grouping exceeded the allowed limit. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AggregationGroupCountExceededLimitParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py b/foundry/models/aggregation_group_count_exceeded_limit_parameters.py index 29ad862d2..ae15bd296 100644 --- a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py +++ b/foundry/models/aggregation_group_count_exceeded_limit_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class AggregationGroupCountExceededLimitParameters(BaseModel): """ AggregationGroupCountExceededLimitParameters - """ # noqa: E501 + """ # noqa: E501 + groups_count: StrictInt = Field(alias="groupsCount") groups_limit: StrictInt = Field(alias="groupsLimit") __properties: ClassVar[Set[str]] = set(("groupsCount", "groupsLimit")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/any_type.py b/foundry/models/any_type.py index 10570a86e..ce427655c 100644 --- a/foundry/models/any_type.py +++ b/foundry/models/any_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class AnyType(BaseModel): """ AnyType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["any"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/api_feature_preview_usage_only.py b/foundry/models/api_feature_preview_usage_only.py index b52b8944f..ccf7e5597 100644 --- a/foundry/models/api_feature_preview_usage_only.py +++ b/foundry/models/api_feature_preview_usage_only.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ApiFeaturePreviewUsageOnly(BaseModel): """ - This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. - """ # noqa: E501 + This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/api_usage_denied.py b/foundry/models/api_usage_denied.py index 41b9e35e0..6e15bc1ba 100644 --- a/foundry/models/api_usage_denied.py +++ b/foundry/models/api_usage_denied.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ApiUsageDenied(BaseModel): """ You are not allowed to use Palantir APIs. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/apply_action_failed.py b/foundry/models/apply_action_failed.py index 0664190d4..5cb2926d2 100644 --- a/foundry/models/apply_action_failed.py +++ b/foundry/models/apply_action_failed.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ApplyActionFailed(BaseModel): """ ApplyActionFailed - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/apply_action_mode.py b/foundry/models/apply_action_mode.py index f75ceee5c..fd8b9a240 100644 --- a/foundry/models/apply_action_mode.py +++ b/foundry/models/apply_action_mode.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,12 +47,10 @@ class ApplyActionMode(str, Enum): """ allowed enum values """ - VALIDATE_ONLY = 'VALIDATE_ONLY' - VALIDATE_AND_EXECUTE = 'VALIDATE_AND_EXECUTE' + VALIDATE_ONLY = "VALIDATE_ONLY" + VALIDATE_AND_EXECUTE = "VALIDATE_AND_EXECUTE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ApplyActionMode from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/apply_action_request_options.py b/foundry/models/apply_action_request_options.py index 1544e6e44..48985b8ed 100644 --- a/foundry/models/apply_action_request_options.py +++ b/foundry/models/apply_action_request_options.py @@ -39,20 +39,17 @@ from foundry.models.return_edits_mode import ReturnEditsMode from typing_extensions import Self + class ApplyActionRequestOptions(BaseModel): """ ApplyActionRequestOptions - """ # noqa: E501 + """ # noqa: E501 + mode: Optional[ApplyActionMode] = None return_edits: Optional[ReturnEditsMode] = Field(default=None, alias="returnEdits") __properties: ClassVar[Set[str]] = set(("mode", "returnEdits")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/async_operation_error.py b/foundry/models/async_operation_error.py index 14580ba7e..74402d49d 100644 --- a/foundry/models/async_operation_error.py +++ b/foundry/models/async_operation_error.py @@ -37,23 +37,22 @@ from pydantic import Field from typing_extensions import Self + class AsyncOperationError(BaseModel): """ AsyncOperationError - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Optional[Dict[str, Any]] = None type: StrictStr - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters", "type")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters", "type") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -96,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_not_found.py b/foundry/models/attachment_not_found.py index 0bf4028d1..5860ea802 100644 --- a/foundry/models/attachment_not_found.py +++ b/foundry/models/attachment_not_found.py @@ -38,29 +38,28 @@ from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters from typing_extensions import Self + class AttachmentNotFound(BaseModel): """ - The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. - """ # noqa: E501 + The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AttachmentNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_not_found_parameters.py b/foundry/models/attachment_not_found_parameters.py index 756e0b36b..7a5c75897 100644 --- a/foundry/models/attachment_not_found_parameters.py +++ b/foundry/models/attachment_not_found_parameters.py @@ -37,19 +37,20 @@ from pydantic import Field from typing_extensions import Self + class AttachmentNotFoundParameters(BaseModel): """ AttachmentNotFoundParameters - """ # noqa: E501 - attachment_rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an attachment.", alias="attachmentRid") - __properties: ClassVar[Set[str]] = set(("attachmentRid")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + attachment_rid: Optional[StrictStr] = Field( + default=None, + description="The unique resource identifier of an attachment.", + alias="attachmentRid", + ) + __properties: ClassVar[Set[str]] = set(("attachmentRid")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_size_exceeded_limit.py b/foundry/models/attachment_size_exceeded_limit.py index e74683d53..75fcdf86f 100644 --- a/foundry/models/attachment_size_exceeded_limit.py +++ b/foundry/models/attachment_size_exceeded_limit.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.attachment_size_exceeded_limit_parameters import AttachmentSizeExceededLimitParameters +from foundry.models.attachment_size_exceeded_limit_parameters import ( + AttachmentSizeExceededLimitParameters, +) from typing_extensions import Self + class AttachmentSizeExceededLimit(BaseModel): """ - The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. - """ # noqa: E501 + The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AttachmentSizeExceededLimitParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_size_exceeded_limit_parameters.py b/foundry/models/attachment_size_exceeded_limit_parameters.py index 9970f6ff9..ec02b6093 100644 --- a/foundry/models/attachment_size_exceeded_limit_parameters.py +++ b/foundry/models/attachment_size_exceeded_limit_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class AttachmentSizeExceededLimitParameters(BaseModel): """ AttachmentSizeExceededLimitParameters - """ # noqa: E501 + """ # noqa: E501 + file_limit_bytes: StrictStr = Field(alias="fileLimitBytes") file_size_bytes: StrictStr = Field(alias="fileSizeBytes") __properties: ClassVar[Set[str]] = set(("fileLimitBytes", "fileSizeBytes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_type.py b/foundry/models/attachment_type.py index a04411be2..cbbc0ae12 100644 --- a/foundry/models/attachment_type.py +++ b/foundry/models/attachment_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class AttachmentType(BaseModel): """ AttachmentType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["attachment"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/binary_type.py b/foundry/models/binary_type.py index 5a37e1fbb..d888061ee 100644 --- a/foundry/models/binary_type.py +++ b/foundry/models/binary_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class BinaryType(BaseModel): """ BinaryType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["binary"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/boolean_type.py b/foundry/models/boolean_type.py index 75696aa62..dd8f859e1 100644 --- a/foundry/models/boolean_type.py +++ b/foundry/models/boolean_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class BooleanType(BaseModel): """ BooleanType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["boolean"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/branch.py b/foundry/models/branch.py index d41fcc346..0f9602f90 100644 --- a/foundry/models/branch.py +++ b/foundry/models/branch.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class Branch(BaseModel): """ - A Branch of a Dataset. - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + A Branch of a Dataset. + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/branch_already_exists.py b/foundry/models/branch_already_exists.py index 7d2120a82..3efa70292 100644 --- a/foundry/models/branch_already_exists.py +++ b/foundry/models/branch_already_exists.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class BranchAlreadyExists(BaseModel): """ The branch cannot be created because a branch with that name already exists. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/branch_already_exists_parameters.py b/foundry/models/branch_already_exists_parameters.py index 5fa3b70bb..10ac0dd0a 100644 --- a/foundry/models/branch_already_exists_parameters.py +++ b/foundry/models/branch_already_exists_parameters.py @@ -37,20 +37,22 @@ from pydantic import Field from typing_extensions import Self + class BranchAlreadyExistsParameters(BaseModel): """ BranchAlreadyExistsParameters - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/branch_not_found.py b/foundry/models/branch_not_found.py index f5fa7994e..c03116508 100644 --- a/foundry/models/branch_not_found.py +++ b/foundry/models/branch_not_found.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class BranchNotFound(BaseModel): """ The requested branch could not be found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/byte_type.py b/foundry/models/byte_type.py index cec878ca5..badc2ce42 100644 --- a/foundry/models/byte_type.py +++ b/foundry/models/byte_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class ByteType(BaseModel): """ ByteType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["byte"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/column_types_not_supported.py b/foundry/models/column_types_not_supported.py index 800d42c6e..b9ccf6936 100644 --- a/foundry/models/column_types_not_supported.py +++ b/foundry/models/column_types_not_supported.py @@ -38,29 +38,28 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self + class ColumnTypesNotSupported(BaseModel): """ The dataset contains column types that are not supported. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/column_types_not_supported_parameters.py b/foundry/models/column_types_not_supported_parameters.py index 267288334..f57ddc868 100644 --- a/foundry/models/column_types_not_supported_parameters.py +++ b/foundry/models/column_types_not_supported_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self + class ColumnTypesNotSupportedParameters(BaseModel): """ ColumnTypesNotSupportedParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - __properties: ClassVar[Set[str]] = set(("datasetRid")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + __properties: ClassVar[Set[str]] = set(("datasetRid")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/commit_transaction_permission_denied.py b/foundry/models/commit_transaction_permission_denied.py index 6c382b446..08b57adc6 100644 --- a/foundry/models/commit_transaction_permission_denied.py +++ b/foundry/models/commit_transaction_permission_denied.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters +from foundry.models.abort_transaction_permission_denied_parameters import ( + AbortTransactionPermissionDeniedParameters, +) from typing_extensions import Self + class CommitTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to commit the given treansaction on the given dataset. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/composite_primary_key_not_supported.py b/foundry/models/composite_primary_key_not_supported.py index cb0ee1e2f..4f74a5d32 100644 --- a/foundry/models/composite_primary_key_not_supported.py +++ b/foundry/models/composite_primary_key_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.composite_primary_key_not_supported_parameters import CompositePrimaryKeyNotSupportedParameters +from foundry.models.composite_primary_key_not_supported_parameters import ( + CompositePrimaryKeyNotSupportedParameters, +) from typing_extensions import Self + class CompositePrimaryKeyNotSupported(BaseModel): """ - Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 + Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: CompositePrimaryKeyNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/composite_primary_key_not_supported_parameters.py b/foundry/models/composite_primary_key_not_supported_parameters.py index b862858eb..3a3326fcc 100644 --- a/foundry/models/composite_primary_key_not_supported_parameters.py +++ b/foundry/models/composite_primary_key_not_supported_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class CompositePrimaryKeyNotSupportedParameters(BaseModel): """ CompositePrimaryKeyNotSupportedParameters - """ # noqa: E501 - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + """ # noqa: E501 + + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) primary_key: Optional[List[StrictStr]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_branch_permission_denied.py b/foundry/models/create_branch_permission_denied.py index e8221fe9f..7d9b31ddf 100644 --- a/foundry/models/create_branch_permission_denied.py +++ b/foundry/models/create_branch_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class CreateBranchPermissionDenied(BaseModel): """ The provided token does not have permission to create a branch of this dataset. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_branch_request.py b/foundry/models/create_branch_request.py index 52b191af8..6f7623934 100644 --- a/foundry/models/create_branch_request.py +++ b/foundry/models/create_branch_request.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class CreateBranchRequest(BaseModel): """ CreateBranchRequest - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_dataset_permission_denied.py b/foundry/models/create_dataset_permission_denied.py index afedc58b3..2039003ab 100644 --- a/foundry/models/create_dataset_permission_denied.py +++ b/foundry/models/create_dataset_permission_denied.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.create_dataset_permission_denied_parameters import CreateDatasetPermissionDeniedParameters +from foundry.models.create_dataset_permission_denied_parameters import ( + CreateDatasetPermissionDeniedParameters, +) from typing_extensions import Self + class CreateDatasetPermissionDenied(BaseModel): """ The provided token does not have permission to create a dataset in this folder. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: CreateDatasetPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_dataset_permission_denied_parameters.py b/foundry/models/create_dataset_permission_denied_parameters.py index 36c902075..8e2b85ef2 100644 --- a/foundry/models/create_dataset_permission_denied_parameters.py +++ b/foundry/models/create_dataset_permission_denied_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class CreateDatasetPermissionDeniedParameters(BaseModel): """ CreateDatasetPermissionDeniedParameters - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_dataset_request.py b/foundry/models/create_dataset_request.py index d3cf06cf4..0bf237dba 100644 --- a/foundry/models/create_dataset_request.py +++ b/foundry/models/create_dataset_request.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class CreateDatasetRequest(BaseModel): """ CreateDatasetRequest - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_link_rule.py b/foundry/models/create_link_rule.py index 1f9a47132..fd8a583bc 100644 --- a/foundry/models/create_link_rule.py +++ b/foundry/models/create_link_rule.py @@ -37,23 +37,40 @@ from pydantic import Field from typing_extensions import Self + class CreateLinkRule(BaseModel): """ CreateLinkRule - """ # noqa: E501 - a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") - b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") - link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") - link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") + """ # noqa: E501 + + a_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="aSideObjectTypeApiName", + ) + b_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="bSideObjectTypeApiName", + ) + link_type_api_name_ato_b: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameAtoB", + ) + link_type_api_name_bto_a: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameBtoA", + ) type: Literal["createLink"] - __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "aSideObjectTypeApiName", + "bSideObjectTypeApiName", + "linkTypeApiNameAtoB", + "linkTypeApiNameBtoA", + "type", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,8 +98,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -96,12 +112,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_object_rule.py b/foundry/models/create_object_rule.py index e8a7d0d60..c919864c2 100644 --- a/foundry/models/create_object_rule.py +++ b/foundry/models/create_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class CreateObjectRule(BaseModel): """ CreateObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["createObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_transaction_permission_denied.py b/foundry/models/create_transaction_permission_denied.py index 7e684a6db..13c4e42c0 100644 --- a/foundry/models/create_transaction_permission_denied.py +++ b/foundry/models/create_transaction_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class CreateTransactionPermissionDenied(BaseModel): """ The provided token does not have permission to create a transaction on this dataset. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_transaction_request.py b/foundry/models/create_transaction_request.py index 26017acdd..0cc10b315 100644 --- a/foundry/models/create_transaction_request.py +++ b/foundry/models/create_transaction_request.py @@ -38,19 +38,16 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self + class CreateTransactionRequest(BaseModel): """ CreateTransactionRequest - """ # noqa: E501 + """ # noqa: E501 + transaction_type: Optional[TransactionType] = Field(default=None, alias="transactionType") __properties: ClassVar[Set[str]] = set(("transactionType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/dataset.py b/foundry/models/dataset.py index 288d147f1..c1dcdc38a 100644 --- a/foundry/models/dataset.py +++ b/foundry/models/dataset.py @@ -37,21 +37,20 @@ from pydantic import Field from typing_extensions import Self + class Dataset(BaseModel): """ Dataset - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ") + rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. " + ) __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/dataset_not_found.py b/foundry/models/dataset_not_found.py index 55cb89b09..8e6486693 100644 --- a/foundry/models/dataset_not_found.py +++ b/foundry/models/dataset_not_found.py @@ -38,29 +38,28 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self + class DatasetNotFound(BaseModel): """ The requested dataset could not be found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/date_type.py b/foundry/models/date_type.py index e8abd589e..1bbdd31db 100644 --- a/foundry/models/date_type.py +++ b/foundry/models/date_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class DateType(BaseModel): """ DateType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["date"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/decimal_type.py b/foundry/models/decimal_type.py index d8f60d6b4..34aae5518 100644 --- a/foundry/models/decimal_type.py +++ b/foundry/models/decimal_type.py @@ -36,21 +36,18 @@ from pydantic import BaseModel, StrictInt, StrictStr from typing_extensions import Self + class DecimalType(BaseModel): """ DecimalType - """ # noqa: E501 + """ # noqa: E501 + precision: Optional[StrictInt] = None scale: Optional[StrictInt] = None type: Literal["decimal"] __properties: ClassVar[Set[str]] = set(("precision", "scale", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_branch_permission_denied.py b/foundry/models/delete_branch_permission_denied.py index 0832324a6..a34182ff1 100644 --- a/foundry/models/delete_branch_permission_denied.py +++ b/foundry/models/delete_branch_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class DeleteBranchPermissionDenied(BaseModel): """ The provided token does not have permission to delete the given branch from this dataset. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_link_rule.py b/foundry/models/delete_link_rule.py index f0e9c0e93..6aec5cbd3 100644 --- a/foundry/models/delete_link_rule.py +++ b/foundry/models/delete_link_rule.py @@ -37,23 +37,40 @@ from pydantic import Field from typing_extensions import Self + class DeleteLinkRule(BaseModel): """ DeleteLinkRule - """ # noqa: E501 - a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") - b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") - link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") - link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") + """ # noqa: E501 + + a_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="aSideObjectTypeApiName", + ) + b_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="bSideObjectTypeApiName", + ) + link_type_api_name_ato_b: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameAtoB", + ) + link_type_api_name_bto_a: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameBtoA", + ) type: Literal["deleteLink"] - __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "aSideObjectTypeApiName", + "bSideObjectTypeApiName", + "linkTypeApiNameAtoB", + "linkTypeApiNameBtoA", + "type", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,8 +98,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -96,12 +112,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_object_rule.py b/foundry/models/delete_object_rule.py index f5cb7d5c6..fe26fc3ad 100644 --- a/foundry/models/delete_object_rule.py +++ b/foundry/models/delete_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class DeleteObjectRule(BaseModel): """ DeleteObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["deleteObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_schema_permission_denied.py b/foundry/models/delete_schema_permission_denied.py index 621eadd23..58c4ee9f7 100644 --- a/foundry/models/delete_schema_permission_denied.py +++ b/foundry/models/delete_schema_permission_denied.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters +from foundry.models.delete_schema_permission_denied_parameters import ( + DeleteSchemaPermissionDeniedParameters, +) from typing_extensions import Self + class DeleteSchemaPermissionDenied(BaseModel): """ todo - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_schema_permission_denied_parameters.py b/foundry/models/delete_schema_permission_denied_parameters.py index af146165a..d26476e56 100644 --- a/foundry/models/delete_schema_permission_denied_parameters.py +++ b/foundry/models/delete_schema_permission_denied_parameters.py @@ -37,21 +37,27 @@ from pydantic import Field from typing_extensions import Self + class DeleteSchemaPermissionDeniedParameters(BaseModel): """ DeleteSchemaPermissionDeniedParameters - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +99,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_api.py b/foundry/models/deployment_api.py index b055aa824..776d26b5f 100644 --- a/foundry/models/deployment_api.py +++ b/foundry/models/deployment_api.py @@ -37,19 +37,16 @@ from foundry.models.deployment_transform_api import DeploymentTransformApi from typing_extensions import Self + class DeploymentApi(BaseModel): """ DeploymentApi - """ # noqa: E501 + """ # noqa: E501 + transform: Optional[DeploymentTransformApi] = None __properties: ClassVar[Set[str]] = set(("transform")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,13 +74,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of transform if self.transform: - _dict['transform'] = self.transform.to_dict() + _dict["transform"] = self.transform.to_dict() return _dict @classmethod @@ -95,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_listing.py b/foundry/models/deployment_listing.py index 5ab91945d..0b9104f0f 100644 --- a/foundry/models/deployment_listing.py +++ b/foundry/models/deployment_listing.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class DeploymentListing(BaseModel): """ - Name and description associated with a model deployment. - """ # noqa: E501 + Name and description associated with a model deployment. + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") + description: Optional[StrictStr] = Field( + default=None, + description="A description or explanation of what this model deployment does and is intended to be used for. ", + ) __properties: ClassVar[Set[str]] = set(("apiName", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_metadata.py b/foundry/models/deployment_metadata.py index e44bf62a6..fd9aa9f5b 100644 --- a/foundry/models/deployment_metadata.py +++ b/foundry/models/deployment_metadata.py @@ -38,21 +38,21 @@ from foundry.models.deployment_api import DeploymentApi from typing_extensions import Self + class DeploymentMetadata(BaseModel): """ - Metadata related to a model deployment. - """ # noqa: E501 + Metadata related to a model deployment. + """ # noqa: E501 + api: DeploymentApi api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") + description: Optional[StrictStr] = Field( + default=None, + description="A description or explanation of what this model deployment does and is intended to be used for. ", + ) __properties: ClassVar[Set[str]] = set(("api", "apiName", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +80,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of api if self.api: - _dict['api'] = self.api.to_dict() + _dict["api"] = self.api.to_dict() return _dict @classmethod @@ -98,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_not_available.py b/foundry/models/deployment_not_available.py index b792a079f..660e9f308 100644 --- a/foundry/models/deployment_not_available.py +++ b/foundry/models/deployment_not_available.py @@ -38,29 +38,28 @@ from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters from typing_extensions import Self + class DeploymentNotAvailable(BaseModel): """ The requested model deployment does not have a model deployed. It may be disabled or failed. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INTERNAL'): + if value not in ("INTERNAL"): raise ValueError("must be one of enum values ('INTERNAL')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_not_available_parameters.py b/foundry/models/deployment_not_available_parameters.py index 0423fe3a5..da3af960d 100644 --- a/foundry/models/deployment_not_available_parameters.py +++ b/foundry/models/deployment_not_available_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class DeploymentNotAvailableParameters(BaseModel): """ DeploymentNotAvailableParameters - """ # noqa: E501 + """ # noqa: E501 + deployment_api_name: Optional[StrictStr] = Field(default=None, alias="deploymentApiName") ontology_api_name: Optional[StrictStr] = Field(default=None, alias="ontologyApiName") __properties: ClassVar[Set[str]] = set(("deploymentApiName", "ontologyApiName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_not_found.py b/foundry/models/deployment_not_found.py index 10337a6a7..3b96a2ba6 100644 --- a/foundry/models/deployment_not_found.py +++ b/foundry/models/deployment_not_found.py @@ -38,29 +38,28 @@ from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters from typing_extensions import Self + class DeploymentNotFound(BaseModel): """ The requested model deployment is not found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_transform_api.py b/foundry/models/deployment_transform_api.py index 120aa6c4a..513847265 100644 --- a/foundry/models/deployment_transform_api.py +++ b/foundry/models/deployment_transform_api.py @@ -37,20 +37,17 @@ from foundry.models.model_api_data_type import ModelApiDataType from typing_extensions import Self + class DeploymentTransformApi(BaseModel): """ DeploymentTransformApi - """ # noqa: E501 + """ # noqa: E501 + inputs: Optional[List[ModelApiDataType]] = None outputs: Optional[List[ModelApiDataType]] = None __properties: ClassVar[Set[str]] = set(("inputs", "outputs")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) @@ -88,14 +84,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict['inputs'] = _items + _dict["inputs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict['outputs'] = _items + _dict["outputs"] = _items return _dict @classmethod @@ -107,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/distance_unit.py b/foundry/models/distance_unit.py index 2a7f32c38..b4ecca5eb 100644 --- a/foundry/models/distance_unit.py +++ b/foundry/models/distance_unit.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,19 +47,17 @@ class DistanceUnit(str, Enum): """ allowed enum values """ - MILLIMETERS = 'MILLIMETERS' - CENTIMETERS = 'CENTIMETERS' - METERS = 'METERS' - KILOMETERS = 'KILOMETERS' - INCHES = 'INCHES' - FEET = 'FEET' - YARDS = 'YARDS' - MILES = 'MILES' - NAUTICAL_MILES = 'NAUTICAL_MILES' + MILLIMETERS = "MILLIMETERS" + CENTIMETERS = "CENTIMETERS" + METERS = "METERS" + KILOMETERS = "KILOMETERS" + INCHES = "INCHES" + FEET = "FEET" + YARDS = "YARDS" + MILES = "MILES" + NAUTICAL_MILES = "NAUTICAL_MILES" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of DistanceUnit from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/double_type.py b/foundry/models/double_type.py index 4587f19a0..e21985eea 100644 --- a/foundry/models/double_type.py +++ b/foundry/models/double_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class DoubleType(BaseModel): """ DoubleType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["double"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/duplicate_order_by.py b/foundry/models/duplicate_order_by.py index 7ca5e2313..7a2d230ca 100644 --- a/foundry/models/duplicate_order_by.py +++ b/foundry/models/duplicate_order_by.py @@ -38,29 +38,28 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self + class DuplicateOrderBy(BaseModel): """ The requested sort order includes duplicate properties. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/duplicate_order_by_parameters.py b/foundry/models/duplicate_order_by_parameters.py index 8b52ca00a..17379dc39 100644 --- a/foundry/models/duplicate_order_by_parameters.py +++ b/foundry/models/duplicate_order_by_parameters.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class DuplicateOrderByParameters(BaseModel): """ DuplicateOrderByParameters - """ # noqa: E501 + """ # noqa: E501 + properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("properties")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/edit_object_permission_denied.py b/foundry/models/edit_object_permission_denied.py index af80e13c6..eaadf3947 100644 --- a/foundry/models/edit_object_permission_denied.py +++ b/foundry/models/edit_object_permission_denied.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class EditObjectPermissionDenied(BaseModel): """ - The user does not have permission to edit this `ObjectType`. - """ # noqa: E501 + The user does not have permission to edit this `ObjectType`. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file.py b/foundry/models/file.py index c0cd32d99..916489615 100644 --- a/foundry/models/file.py +++ b/foundry/models/file.py @@ -37,22 +37,24 @@ from pydantic import Field from typing_extensions import Self + class File(BaseModel): """ File - """ # noqa: E501 - path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") + """ # noqa: E501 + + path: StrictStr = Field( + description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " + ) size_bytes: Optional[StrictStr] = Field(default=None, alias="sizeBytes") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) updated_time: datetime = Field(alias="updatedTime") __properties: ClassVar[Set[str]] = set(("path", "sizeBytes", "transactionRid", "updatedTime")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_already_exists.py b/foundry/models/file_already_exists.py index 353974c3e..fb959ec25 100644 --- a/foundry/models/file_already_exists.py +++ b/foundry/models/file_already_exists.py @@ -38,29 +38,28 @@ from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters from typing_extensions import Self + class FileAlreadyExists(BaseModel): """ The given file path already exists in the dataset and transaction. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_already_exists_parameters.py b/foundry/models/file_already_exists_parameters.py index e21ed993c..10d369996 100644 --- a/foundry/models/file_already_exists_parameters.py +++ b/foundry/models/file_already_exists_parameters.py @@ -37,21 +37,26 @@ from pydantic import Field from typing_extensions import Self + class FileAlreadyExistsParameters(BaseModel): """ FileAlreadyExistsParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + path: StrictStr = Field( + description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " + ) + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("datasetRid", "path", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_not_found_on_branch.py b/foundry/models/file_not_found_on_branch.py index 335a1e07b..a0f9169f1 100644 --- a/foundry/models/file_not_found_on_branch.py +++ b/foundry/models/file_not_found_on_branch.py @@ -38,29 +38,28 @@ from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters from typing_extensions import Self + class FileNotFoundOnBranch(BaseModel): """ The requested file could not be found on the given branch, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileNotFoundOnBranchParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_not_found_on_branch_parameters.py b/foundry/models/file_not_found_on_branch_parameters.py index 8957eff20..024f93200 100644 --- a/foundry/models/file_not_found_on_branch_parameters.py +++ b/foundry/models/file_not_found_on_branch_parameters.py @@ -37,21 +37,25 @@ from pydantic import Field from typing_extensions import Self + class FileNotFoundOnBranchParameters(BaseModel): """ FileNotFoundOnBranchParameters - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + path: StrictStr = Field( + description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " + ) __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "path")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_not_found_on_transaction_range.py b/foundry/models/file_not_found_on_transaction_range.py index c7b9180a7..c95454870 100644 --- a/foundry/models/file_not_found_on_transaction_range.py +++ b/foundry/models/file_not_found_on_transaction_range.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.file_not_found_on_transaction_range_parameters import FileNotFoundOnTransactionRangeParameters +from foundry.models.file_not_found_on_transaction_range_parameters import ( + FileNotFoundOnTransactionRangeParameters, +) from typing_extensions import Self + class FileNotFoundOnTransactionRange(BaseModel): """ The requested file could not be found on the given transaction range, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileNotFoundOnTransactionRangeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file_not_found_on_transaction_range_parameters.py b/foundry/models/file_not_found_on_transaction_range_parameters.py index b9eb115c9..7a9fb4715 100644 --- a/foundry/models/file_not_found_on_transaction_range_parameters.py +++ b/foundry/models/file_not_found_on_transaction_range_parameters.py @@ -37,22 +37,33 @@ from pydantic import Field from typing_extensions import Self + class FileNotFoundOnTransactionRangeParameters(BaseModel): """ FileNotFoundOnTransactionRangeParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - end_transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="endTransactionRid") - path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") - start_transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="startTransactionRid") - __properties: ClassVar[Set[str]] = set(("datasetRid", "endTransactionRid", "path", "startTransactionRid")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + """ # noqa: E501 + + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + end_transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="endTransactionRid", + ) + path: StrictStr = Field( + description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " + ) + start_transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="startTransactionRid", + ) + __properties: ClassVar[Set[str]] = set( + ("datasetRid", "endTransactionRid", "path", "startTransactionRid") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/float_type.py b/foundry/models/float_type.py index adf518340..3313f6848 100644 --- a/foundry/models/float_type.py +++ b/foundry/models/float_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class FloatType(BaseModel): """ FloatType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["float"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/folder_not_found.py b/foundry/models/folder_not_found.py index 65201d068..f8abb6129 100644 --- a/foundry/models/folder_not_found.py +++ b/foundry/models/folder_not_found.py @@ -38,29 +38,28 @@ from foundry.models.folder_not_found_parameters import FolderNotFoundParameters from typing_extensions import Self + class FolderNotFound(BaseModel): """ The requested folder could not be found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FolderNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/folder_not_found_parameters.py b/foundry/models/folder_not_found_parameters.py index daadb09de..860693282 100644 --- a/foundry/models/folder_not_found_parameters.py +++ b/foundry/models/folder_not_found_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class FolderNotFoundParameters(BaseModel): """ FolderNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + folder_rid: StrictStr = Field(alias="folderRid") __properties: ClassVar[Set[str]] = set(("folderRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_encountered_user_facing_error.py b/foundry/models/function_encountered_user_facing_error.py index 49e6bdd7b..50076d8e4 100644 --- a/foundry/models/function_encountered_user_facing_error.py +++ b/foundry/models/function_encountered_user_facing_error.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters +from foundry.models.function_encountered_user_facing_error_parameters import ( + FunctionEncounteredUserFacingErrorParameters, +) from typing_extensions import Self + class FunctionEncounteredUserFacingError(BaseModel): """ - The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 + The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_encountered_user_facing_error_parameters.py b/foundry/models/function_encountered_user_facing_error_parameters.py index 605cf96cc..6f5303fff 100644 --- a/foundry/models/function_encountered_user_facing_error_parameters.py +++ b/foundry/models/function_encountered_user_facing_error_parameters.py @@ -37,21 +37,24 @@ from pydantic import Field from typing_extensions import Self + class FunctionEncounteredUserFacingErrorParameters(BaseModel): """ FunctionEncounteredUserFacingErrorParameters - """ # noqa: E501 - function_rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", alias="functionRid") - function_version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", alias="functionVersion") + """ # noqa: E501 + + function_rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", + alias="functionRid", + ) + function_version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", + alias="functionVersion", + ) message: StrictStr __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion", "message")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_execution_failed.py b/foundry/models/function_execution_failed.py index 026cf0100..cb8c810b2 100644 --- a/foundry/models/function_execution_failed.py +++ b/foundry/models/function_execution_failed.py @@ -38,29 +38,28 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self + class FunctionExecutionFailed(BaseModel): """ FunctionExecutionFailed - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_execution_failed_parameters.py b/foundry/models/function_execution_failed_parameters.py index b3c9438e7..769169fb8 100644 --- a/foundry/models/function_execution_failed_parameters.py +++ b/foundry/models/function_execution_failed_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class FunctionExecutionFailedParameters(BaseModel): """ FunctionExecutionFailedParameters - """ # noqa: E501 - function_rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", alias="functionRid") - function_version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", alias="functionVersion") + """ # noqa: E501 + + function_rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", + alias="functionRid", + ) + function_version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", + alias="functionVersion", + ) __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_execution_timed_out.py b/foundry/models/function_execution_timed_out.py index 0e4d98c15..e76a3c19d 100644 --- a/foundry/models/function_execution_timed_out.py +++ b/foundry/models/function_execution_timed_out.py @@ -38,29 +38,28 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self + class FunctionExecutionTimedOut(BaseModel): """ FunctionExecutionTimedOut - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('TIMEOUT'): + if value not in ("TIMEOUT"): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/function_invalid_input.py b/foundry/models/function_invalid_input.py index 5c4e30520..3d1f3bfaf 100644 --- a/foundry/models/function_invalid_input.py +++ b/foundry/models/function_invalid_input.py @@ -38,29 +38,28 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self + class FunctionInvalidInput(BaseModel): """ FunctionInvalidInput - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_point.py b/foundry/models/geo_point.py index 64aaa9148..84d761d0e 100644 --- a/foundry/models/geo_point.py +++ b/foundry/models/geo_point.py @@ -38,21 +38,25 @@ from typing_extensions import Annotated from typing_extensions import Self + class GeoPoint(BaseModel): """ GeoPoint - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)] = Field(description="GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as \"M\") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ") + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] = Field( + description='GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ' + ) type: Literal["Point"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_point_type.py b/foundry/models/geo_point_type.py index 46d10da35..c5becf4c9 100644 --- a/foundry/models/geo_point_type.py +++ b/foundry/models/geo_point_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class GeoPointType(BaseModel): """ GeoPointType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["geopoint"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_shape_type.py b/foundry/models/geo_shape_type.py index d848b9d8d..a75faa14c 100644 --- a/foundry/models/geo_shape_type.py +++ b/foundry/models/geo_shape_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class GeoShapeType(BaseModel): """ GeoShapeType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["geoshape"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geometry.py b/foundry/models/geometry.py index 175e23cf4..6627faffe 100644 --- a/foundry/models/geometry.py +++ b/foundry/models/geometry.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -54,19 +55,18 @@ class GeometryCollection(BaseModel): """ - GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) geometries: Optional[Annotated[List[Geometry], Field(min_length=0)]] = None type: Literal["GeometryCollection"] __properties: ClassVar[Set[str]] = set(("bbox", "geometries", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -94,8 +94,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in geometries (list) @@ -104,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.geometries: if _item: _items.append(_item.to_dict()) - _dict['geometries'] = _items + _dict["geometries"] = _items return _dict @classmethod @@ -116,14 +115,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors GeometryCollection.model_rebuild(raise_errors=False) @@ -131,9 +131,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ Abstract type for all GeoJSon object except Feature and FeatureCollection """ -Geometry = Annotated[Union[GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon], Field(discriminator="type")] - - +Geometry = Annotated[ + Union[ + GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/integer_type.py b/foundry/models/integer_type.py index 38440b840..6ce6dd4a2 100644 --- a/foundry/models/integer_type.py +++ b/foundry/models/integer_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class IntegerType(BaseModel): """ IntegerType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["integer"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_aggregation_range.py b/foundry/models/invalid_aggregation_range.py index 843363633..ff243ca3f 100644 --- a/foundry/models/invalid_aggregation_range.py +++ b/foundry/models/invalid_aggregation_range.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class InvalidAggregationRange(BaseModel): """ - Aggregation range should include one lt or lte and one gt or gte. - """ # noqa: E501 + Aggregation range should include one lt or lte and one gt or gte. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_aggregation_range_property_type.py b/foundry/models/invalid_aggregation_range_property_type.py index 867be5a31..fb7d53033 100644 --- a/foundry/models/invalid_aggregation_range_property_type.py +++ b/foundry/models/invalid_aggregation_range_property_type.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters +from foundry.models.invalid_aggregation_range_property_type_parameters import ( + InvalidAggregationRangePropertyTypeParameters, +) from typing_extensions import Self + class InvalidAggregationRangePropertyType(BaseModel): """ - Range group by is not supported by property type. - """ # noqa: E501 + Range group by is not supported by property type. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_aggregation_range_property_type_parameters.py b/foundry/models/invalid_aggregation_range_property_type_parameters.py index 318aa1ee1..368d0e0e9 100644 --- a/foundry/models/invalid_aggregation_range_property_type_parameters.py +++ b/foundry/models/invalid_aggregation_range_property_type_parameters.py @@ -37,21 +37,27 @@ from pydantic import Field from typing_extensions import Self + class InvalidAggregationRangePropertyTypeParameters(BaseModel): """ InvalidAggregationRangePropertyTypeParameters - """ # noqa: E501 - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") - property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") + """ # noqa: E501 + + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) + property_base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="propertyBaseType", + ) __properties: ClassVar[Set[str]] = set(("objectType", "property", "propertyBaseType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +99,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_aggregation_range_value.py b/foundry/models/invalid_aggregation_range_value.py index 05b7ed13a..358a55662 100644 --- a/foundry/models/invalid_aggregation_range_value.py +++ b/foundry/models/invalid_aggregation_range_value.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters +from foundry.models.invalid_aggregation_range_property_type_parameters import ( + InvalidAggregationRangePropertyTypeParameters, +) from typing_extensions import Self + class InvalidAggregationRangeValue(BaseModel): """ - Aggregation value does not conform to the expected underlying type. - """ # noqa: E501 + Aggregation value does not conform to the expected underlying type. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_apply_action_option_combination.py b/foundry/models/invalid_apply_action_option_combination.py index 10c5580ad..74149e7f6 100644 --- a/foundry/models/invalid_apply_action_option_combination.py +++ b/foundry/models/invalid_apply_action_option_combination.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_apply_action_option_combination_parameters import InvalidApplyActionOptionCombinationParameters +from foundry.models.invalid_apply_action_option_combination_parameters import ( + InvalidApplyActionOptionCombinationParameters, +) from typing_extensions import Self + class InvalidApplyActionOptionCombination(BaseModel): """ The given options are individually valid but cannot be used in the given combination. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidApplyActionOptionCombinationParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_apply_action_option_combination_parameters.py b/foundry/models/invalid_apply_action_option_combination_parameters.py index 8794de092..0f1d3ffa6 100644 --- a/foundry/models/invalid_apply_action_option_combination_parameters.py +++ b/foundry/models/invalid_apply_action_option_combination_parameters.py @@ -38,19 +38,18 @@ from foundry.models.apply_action_request_options import ApplyActionRequestOptions from typing_extensions import Self + class InvalidApplyActionOptionCombinationParameters(BaseModel): """ InvalidApplyActionOptionCombinationParameters - """ # noqa: E501 - invalid_combination: Optional[ApplyActionRequestOptions] = Field(default=None, alias="invalidCombination") - __properties: ClassVar[Set[str]] = set(("invalidCombination")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + invalid_combination: Optional[ApplyActionRequestOptions] = Field( + default=None, alias="invalidCombination" + ) + __properties: ClassVar[Set[str]] = set(("invalidCombination")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,13 +77,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of invalid_combination if self.invalid_combination: - _dict['invalidCombination'] = self.invalid_combination.to_dict() + _dict["invalidCombination"] = self.invalid_combination.to_dict() return _dict @classmethod @@ -96,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_branch_id.py b/foundry/models/invalid_branch_id.py index 1cf300cff..77099becb 100644 --- a/foundry/models/invalid_branch_id.py +++ b/foundry/models/invalid_branch_id.py @@ -38,29 +38,28 @@ from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters from typing_extensions import Self + class InvalidBranchId(BaseModel): """ The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidBranchIdParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_branch_id_parameters.py b/foundry/models/invalid_branch_id_parameters.py index d8e6bd983..5eb54cdfe 100644 --- a/foundry/models/invalid_branch_id_parameters.py +++ b/foundry/models/invalid_branch_id_parameters.py @@ -37,19 +37,18 @@ from pydantic import Field from typing_extensions import Self + class InvalidBranchIdParameters(BaseModel): """ InvalidBranchIdParameters - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - __properties: ClassVar[Set[str]] = set(("branchId")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + __properties: ClassVar[Set[str]] = set(("branchId")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +90,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_content_length.py b/foundry/models/invalid_content_length.py index 1cce28379..9d25acaab 100644 --- a/foundry/models/invalid_content_length.py +++ b/foundry/models/invalid_content_length.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class InvalidContentLength(BaseModel): """ A `Content-Length` header is required for all uploads, but was missing or invalid. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_content_type.py b/foundry/models/invalid_content_type.py index 3455d2859..d2e459938 100644 --- a/foundry/models/invalid_content_type.py +++ b/foundry/models/invalid_content_type.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class InvalidContentType(BaseModel): """ - The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. - """ # noqa: E501 + The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_duration_group_by_property_type.py b/foundry/models/invalid_duration_group_by_property_type.py index f878bc6f3..0fae64627 100644 --- a/foundry/models/invalid_duration_group_by_property_type.py +++ b/foundry/models/invalid_duration_group_by_property_type.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters +from foundry.models.invalid_aggregation_range_property_type_parameters import ( + InvalidAggregationRangePropertyTypeParameters, +) from typing_extensions import Self + class InvalidDurationGroupByPropertyType(BaseModel): """ - Invalid property type for duration groupBy. - """ # noqa: E501 + Invalid property type for duration groupBy. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_duration_group_by_value.py b/foundry/models/invalid_duration_group_by_value.py index 9fd4faaf9..bff8707a7 100644 --- a/foundry/models/invalid_duration_group_by_value.py +++ b/foundry/models/invalid_duration_group_by_value.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class InvalidDurationGroupByValue(BaseModel): """ - Duration groupBy value is invalid. - """ # noqa: E501 + Duration groupBy value is invalid. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_fields.py b/foundry/models/invalid_fields.py index adff85a79..1967c9125 100644 --- a/foundry/models/invalid_fields.py +++ b/foundry/models/invalid_fields.py @@ -38,29 +38,28 @@ from foundry.models.invalid_fields_parameters import InvalidFieldsParameters from typing_extensions import Self + class InvalidFields(BaseModel): """ TBD - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidFieldsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_fields_parameters.py b/foundry/models/invalid_fields_parameters.py index 0d5882bd1..3b7864e7c 100644 --- a/foundry/models/invalid_fields_parameters.py +++ b/foundry/models/invalid_fields_parameters.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class InvalidFieldsParameters(BaseModel): """ InvalidFieldsParameters - """ # noqa: E501 + """ # noqa: E501 + properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("properties")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_group_id.py b/foundry/models/invalid_group_id.py index dd1835d70..2216627ed 100644 --- a/foundry/models/invalid_group_id.py +++ b/foundry/models/invalid_group_id.py @@ -38,29 +38,28 @@ from foundry.models.invalid_group_id_parameters import InvalidGroupIdParameters from typing_extensions import Self + class InvalidGroupId(BaseModel): """ The provided value for a group id must be a UUID. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidGroupIdParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_group_id_parameters.py b/foundry/models/invalid_group_id_parameters.py index a99d782ba..d4d3e24a8 100644 --- a/foundry/models/invalid_group_id_parameters.py +++ b/foundry/models/invalid_group_id_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class InvalidGroupIdParameters(BaseModel): """ InvalidGroupIdParameters - """ # noqa: E501 + """ # noqa: E501 + group_id: StrictStr = Field(alias="groupId") __properties: ClassVar[Set[str]] = set(("groupId")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_page_size.py b/foundry/models/invalid_page_size.py index 6ddccef2c..e5d8f9382 100644 --- a/foundry/models/invalid_page_size.py +++ b/foundry/models/invalid_page_size.py @@ -38,29 +38,28 @@ from foundry.models.invalid_page_size_parameters import InvalidPageSizeParameters from typing_extensions import Self + class InvalidPageSize(BaseModel): """ The provided page size was zero or negative. Page sizes must be greater than zero. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPageSizeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_page_size_parameters.py b/foundry/models/invalid_page_size_parameters.py index 8572591e9..333e9781d 100644 --- a/foundry/models/invalid_page_size_parameters.py +++ b/foundry/models/invalid_page_size_parameters.py @@ -37,19 +37,18 @@ from pydantic import Field from typing_extensions import Self + class InvalidPageSizeParameters(BaseModel): """ InvalidPageSizeParameters - """ # noqa: E501 - page_size: StrictInt = Field(description="The page size to use for the endpoint.", alias="pageSize") - __properties: ClassVar[Set[str]] = set(("pageSize")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + page_size: StrictInt = Field( + description="The page size to use for the endpoint.", alias="pageSize" + ) + __properties: ClassVar[Set[str]] = set(("pageSize")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +90,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_page_token.py b/foundry/models/invalid_page_token.py index 24551b141..dd1379125 100644 --- a/foundry/models/invalid_page_token.py +++ b/foundry/models/invalid_page_token.py @@ -38,29 +38,28 @@ from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters from typing_extensions import Self + class InvalidPageToken(BaseModel): """ The provided page token could not be used to retrieve the next page of results. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPageTokenParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_page_token_parameters.py b/foundry/models/invalid_page_token_parameters.py index ae51ddd6d..cddf43ace 100644 --- a/foundry/models/invalid_page_token_parameters.py +++ b/foundry/models/invalid_page_token_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self + class InvalidPageTokenParameters(BaseModel): """ InvalidPageTokenParameters - """ # noqa: E501 - page_token: StrictStr = Field(description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="pageToken") - __properties: ClassVar[Set[str]] = set(("pageToken")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + page_token: StrictStr = Field( + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="pageToken", + ) + __properties: ClassVar[Set[str]] = set(("pageToken")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_parameter_combination.py b/foundry/models/invalid_parameter_combination.py index 4af2b45a6..04114118e 100644 --- a/foundry/models/invalid_parameter_combination.py +++ b/foundry/models/invalid_parameter_combination.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_parameter_combination_parameters import InvalidParameterCombinationParameters +from foundry.models.invalid_parameter_combination_parameters import ( + InvalidParameterCombinationParameters, +) from typing_extensions import Self + class InvalidParameterCombination(BaseModel): """ The given parameters are individually valid but cannot be used in the given combination. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidParameterCombinationParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_parameter_combination_parameters.py b/foundry/models/invalid_parameter_combination_parameters.py index b7755a678..1251ee3ba 100644 --- a/foundry/models/invalid_parameter_combination_parameters.py +++ b/foundry/models/invalid_parameter_combination_parameters.py @@ -37,20 +37,19 @@ from pydantic import Field from typing_extensions import Self + class InvalidParameterCombinationParameters(BaseModel): """ InvalidParameterCombinationParameters - """ # noqa: E501 + """ # noqa: E501 + provided_parameters: Optional[List[StrictStr]] = Field(default=None, alias="providedParameters") - valid_combinations: Optional[List[List[StrictStr]]] = Field(default=None, alias="validCombinations") + valid_combinations: Optional[List[List[StrictStr]]] = Field( + default=None, alias="validCombinations" + ) __properties: ClassVar[Set[str]] = set(("providedParameters", "validCombinations")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_parameter_value.py b/foundry/models/invalid_parameter_value.py index 872955c40..75c84c8c2 100644 --- a/foundry/models/invalid_parameter_value.py +++ b/foundry/models/invalid_parameter_value.py @@ -38,29 +38,28 @@ from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters from typing_extensions import Self + class InvalidParameterValue(BaseModel): """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 + The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidParameterValueParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_parameter_value_parameters.py b/foundry/models/invalid_parameter_value_parameters.py index e48dd1bce..9c7bc62ea 100644 --- a/foundry/models/invalid_parameter_value_parameters.py +++ b/foundry/models/invalid_parameter_value_parameters.py @@ -38,22 +38,32 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self + class InvalidParameterValueParameters(BaseModel): """ InvalidParameterValueParameters - """ # noqa: E501 - parameter_base_type: Optional[StrictStr] = Field(default=None, description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="parameterBaseType") - parameter_data_type: Optional[OntologyDataType] = Field(default=None, alias="parameterDataType") - parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") - parameter_value: Optional[Any] = Field(default=None, description="Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | string | `\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `\"EMP1234\"` | | Set | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Struct | JSON object | `{\"name\": \"John Doe\", \"age\": 42}` | | TwoDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"NYC\", \"groups\": [{\"key\": \"Engineer\", \"value\" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="parameterValue") - __properties: ClassVar[Set[str]] = set(("parameterBaseType", "parameterDataType", "parameterId", "parameterValue")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + """ # noqa: E501 + parameter_base_type: Optional[StrictStr] = Field( + default=None, + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="parameterBaseType", + ) + parameter_data_type: Optional[OntologyDataType] = Field(default=None, alias="parameterDataType") + parameter_id: StrictStr = Field( + description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", + alias="parameterId", + ) + parameter_value: Optional[Any] = Field( + default=None, + description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', + alias="parameterValue", + ) + __properties: ClassVar[Set[str]] = set( + ("parameterBaseType", "parameterDataType", "parameterId", "parameterValue") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,17 +91,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameter_data_type if self.parameter_data_type: - _dict['parameterDataType'] = self.parameter_data_type.to_dict() + _dict["parameterDataType"] = self.parameter_data_type.to_dict() # set to None if parameter_value (nullable) is None # and model_fields_set contains the field if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict['parameterValue'] = None + _dict["parameterValue"] = None return _dict @@ -104,12 +113,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_filter_value.py b/foundry/models/invalid_property_filter_value.py index cfcd9cad9..ab6167a84 100644 --- a/foundry/models/invalid_property_filter_value.py +++ b/foundry/models/invalid_property_filter_value.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filter_value_parameters import InvalidPropertyFilterValueParameters +from foundry.models.invalid_property_filter_value_parameters import ( + InvalidPropertyFilterValueParameters, +) from typing_extensions import Self + class InvalidPropertyFilterValue(BaseModel): """ - The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - """ # noqa: E501 + The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFilterValueParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_filter_value_parameters.py b/foundry/models/invalid_property_filter_value_parameters.py index 41009f375..b1a888290 100644 --- a/foundry/models/invalid_property_filter_value_parameters.py +++ b/foundry/models/invalid_property_filter_value_parameters.py @@ -37,22 +37,33 @@ from pydantic import Field from typing_extensions import Self + class InvalidPropertyFilterValueParameters(BaseModel): """ InvalidPropertyFilterValueParameters - """ # noqa: E501 - expected_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="expectedType") - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") - property_filter: StrictStr = Field(description="Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ", alias="propertyFilter") - property_filter_value: StrictStr = Field(description="Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. ", alias="propertyFilterValue") - __properties: ClassVar[Set[str]] = set(("expectedType", "property", "propertyFilter", "propertyFilterValue")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + """ # noqa: E501 + + expected_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="expectedType", + ) + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) + property_filter: StrictStr = Field( + description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', + alias="propertyFilter", + ) + property_filter_value: StrictStr = Field( + description="Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. ", + alias="propertyFilterValue", + ) + __properties: ClassVar[Set[str]] = set( + ("expectedType", "property", "propertyFilter", "propertyFilterValue") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_filters_combination.py b/foundry/models/invalid_property_filters_combination.py index 80f10af77..682490f3e 100644 --- a/foundry/models/invalid_property_filters_combination.py +++ b/foundry/models/invalid_property_filters_combination.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters +from foundry.models.invalid_property_filters_combination_parameters import ( + InvalidPropertyFiltersCombinationParameters, +) from typing_extensions import Self + class InvalidPropertyFiltersCombination(BaseModel): """ The provided filters cannot be used together. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_filters_combination_parameters.py b/foundry/models/invalid_property_filters_combination_parameters.py index 2c6c6f8b6..90d8fb411 100644 --- a/foundry/models/invalid_property_filters_combination_parameters.py +++ b/foundry/models/invalid_property_filters_combination_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class InvalidPropertyFiltersCombinationParameters(BaseModel): """ InvalidPropertyFiltersCombinationParameters - """ # noqa: E501 - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") + """ # noqa: E501 + + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) property_filters: Optional[List[StrictStr]] = Field(default=None, alias="propertyFilters") __properties: ClassVar[Set[str]] = set(("property", "propertyFilters")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_type.py b/foundry/models/invalid_property_type.py index e11beea84..1ae77a83a 100644 --- a/foundry/models/invalid_property_type.py +++ b/foundry/models/invalid_property_type.py @@ -38,29 +38,28 @@ from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters from typing_extensions import Self + class InvalidPropertyType(BaseModel): """ - The given property type is not of the expected type. - """ # noqa: E501 + The given property type is not of the expected type. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_type_parameters.py b/foundry/models/invalid_property_type_parameters.py index 955a705e5..8637e8f47 100644 --- a/foundry/models/invalid_property_type_parameters.py +++ b/foundry/models/invalid_property_type_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class InvalidPropertyTypeParameters(BaseModel): """ InvalidPropertyTypeParameters - """ # noqa: E501 - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") - property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") + """ # noqa: E501 + + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) + property_base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="propertyBaseType", + ) __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_value.py b/foundry/models/invalid_property_value.py index 6d45911bc..16e16b0a8 100644 --- a/foundry/models/invalid_property_value.py +++ b/foundry/models/invalid_property_value.py @@ -38,29 +38,28 @@ from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters from typing_extensions import Self + class InvalidPropertyValue(BaseModel): """ - The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. - """ # noqa: E501 + The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyValueParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_property_value_parameters.py b/foundry/models/invalid_property_value_parameters.py index 40548240d..5abae0b81 100644 --- a/foundry/models/invalid_property_value_parameters.py +++ b/foundry/models/invalid_property_value_parameters.py @@ -37,21 +37,27 @@ from pydantic import Field from typing_extensions import Self + class InvalidPropertyValueParameters(BaseModel): """ InvalidPropertyValueParameters - """ # noqa: E501 - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") - property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") - property_value: Optional[Any] = Field(description="Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | JSON encoded `AttachmentProperty` object | `{\"rid\":\"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"}` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Double | number | `3.14159265` | | Float | number | `3.14159265` | | GeoPoint | geojson | `{\"type\":\"Point\",\"coordinates\":[102.0,0.5]}` | | GeoShape | geojson | `{\"type\":\"LineString\",\"coordinates\":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="propertyValue") + """ # noqa: E501 + + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) + property_base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="propertyBaseType", + ) + property_value: Optional[Any] = Field( + description='Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Double | number | `3.14159265` | | Float | number | `3.14159265` | | GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | | GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', + alias="propertyValue", + ) __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType", "propertyValue")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,14 +85,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # set to None if property_value (nullable) is None # and model_fields_set contains the field if self.property_value is None and "property_value" in self.model_fields_set: - _dict['propertyValue'] = None + _dict["propertyValue"] = None return _dict @@ -99,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_query_parameter_value.py b/foundry/models/invalid_query_parameter_value.py index 054b30e90..4bca54e40 100644 --- a/foundry/models/invalid_query_parameter_value.py +++ b/foundry/models/invalid_query_parameter_value.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_query_parameter_value_parameters import InvalidQueryParameterValueParameters +from foundry.models.invalid_query_parameter_value_parameters import ( + InvalidQueryParameterValueParameters, +) from typing_extensions import Self + class InvalidQueryParameterValue(BaseModel): """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 + The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidQueryParameterValueParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_query_parameter_value_parameters.py b/foundry/models/invalid_query_parameter_value_parameters.py index 4258cf391..e73dde6c9 100644 --- a/foundry/models/invalid_query_parameter_value_parameters.py +++ b/foundry/models/invalid_query_parameter_value_parameters.py @@ -38,21 +38,25 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self + class InvalidQueryParameterValueParameters(BaseModel): """ InvalidQueryParameterValueParameters - """ # noqa: E501 + """ # noqa: E501 + parameter_data_type: QueryDataType = Field(alias="parameterDataType") - parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") - parameter_value: Optional[Any] = Field(default=None, description="Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Attachment | string | `\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `\"2021-05-01\"` | | Decimal | string | `\"2.718281828\"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `\"58319870951433\"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object's primary key | `10033123` or `\"EMP1234\"` | | Set | array | `[\"alpha\", \"bravo\", \"charlie\"]` | | Short | number | `8739` | | String | string | `\"Call me Ishmael\"` | | Struct | JSON object | `{\"name\": \"John Doe\", \"age\": 42}` | | TwoDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{\"groups\": [{\"key\": \"NYC\", \"groups\": [{\"key\": \"Engineer\", \"value\" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `\"2021-01-04T05:00:00Z\"` | ", alias="parameterValue") + parameter_id: StrictStr = Field( + description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", + alias="parameterId", + ) + parameter_value: Optional[Any] = Field( + default=None, + description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', + alias="parameterValue", + ) __properties: ClassVar[Set[str]] = set(("parameterDataType", "parameterId", "parameterValue")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,17 +84,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameter_data_type if self.parameter_data_type: - _dict['parameterDataType'] = self.parameter_data_type.to_dict() + _dict["parameterDataType"] = self.parameter_data_type.to_dict() # set to None if parameter_value (nullable) is None # and model_fields_set contains the field if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict['parameterValue'] = None + _dict["parameterValue"] = None return _dict @@ -103,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_range_query.py b/foundry/models/invalid_range_query.py index b2cb1d060..878fafb39 100644 --- a/foundry/models/invalid_range_query.py +++ b/foundry/models/invalid_range_query.py @@ -38,29 +38,28 @@ from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters from typing_extensions import Self + class InvalidRangeQuery(BaseModel): """ - The specified query range filter is invalid. - """ # noqa: E501 + The specified query range filter is invalid. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidRangeQueryParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_range_query_parameters.py b/foundry/models/invalid_range_query_parameters.py index 3d1ea2258..f8b6d3b15 100644 --- a/foundry/models/invalid_range_query_parameters.py +++ b/foundry/models/invalid_range_query_parameters.py @@ -37,10 +37,12 @@ from pydantic import Field from typing_extensions import Self + class InvalidRangeQueryParameters(BaseModel): """ InvalidRangeQueryParameters - """ # noqa: E501 + """ # noqa: E501 + field: StrictStr gt: Optional[Any] = Field(default=None, description="Greater than") gte: Optional[Any] = Field(default=None, description="Greater than or equal") @@ -48,12 +50,7 @@ class InvalidRangeQueryParameters(BaseModel): lte: Optional[Any] = Field(default=None, description="Less than or equal") __properties: ClassVar[Set[str]] = set(("field", "gt", "gte", "lt", "lte")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,29 +78,28 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # set to None if gt (nullable) is None # and model_fields_set contains the field if self.gt is None and "gt" in self.model_fields_set: - _dict['gt'] = None + _dict["gt"] = None # set to None if gte (nullable) is None # and model_fields_set contains the field if self.gte is None and "gte" in self.model_fields_set: - _dict['gte'] = None + _dict["gte"] = None # set to None if lt (nullable) is None # and model_fields_set contains the field if self.lt is None and "lt" in self.model_fields_set: - _dict['lt'] = None + _dict["lt"] = None # set to None if lte (nullable) is None # and model_fields_set contains the field if self.lte is None and "lte" in self.model_fields_set: - _dict['lte'] = None + _dict["lte"] = None return _dict @@ -116,12 +112,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_sort_order.py b/foundry/models/invalid_sort_order.py index 57be82062..e1a4f2f8c 100644 --- a/foundry/models/invalid_sort_order.py +++ b/foundry/models/invalid_sort_order.py @@ -38,29 +38,28 @@ from foundry.models.invalid_sort_order_parameters import InvalidSortOrderParameters from typing_extensions import Self + class InvalidSortOrder(BaseModel): """ - The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. - """ # noqa: E501 + The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidSortOrderParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_sort_order_parameters.py b/foundry/models/invalid_sort_order_parameters.py index 676bd53d9..db39f0761 100644 --- a/foundry/models/invalid_sort_order_parameters.py +++ b/foundry/models/invalid_sort_order_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class InvalidSortOrderParameters(BaseModel): """ InvalidSortOrderParameters - """ # noqa: E501 + """ # noqa: E501 + invalid_sort_order: StrictStr = Field(alias="invalidSortOrder") __properties: ClassVar[Set[str]] = set(("invalidSortOrder")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_sort_type.py b/foundry/models/invalid_sort_type.py index 826231c8e..b6095826f 100644 --- a/foundry/models/invalid_sort_type.py +++ b/foundry/models/invalid_sort_type.py @@ -38,29 +38,28 @@ from foundry.models.invalid_sort_type_parameters import InvalidSortTypeParameters from typing_extensions import Self + class InvalidSortType(BaseModel): """ The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidSortTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_sort_type_parameters.py b/foundry/models/invalid_sort_type_parameters.py index c102115bb..09e94fc86 100644 --- a/foundry/models/invalid_sort_type_parameters.py +++ b/foundry/models/invalid_sort_type_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class InvalidSortTypeParameters(BaseModel): """ InvalidSortTypeParameters - """ # noqa: E501 + """ # noqa: E501 + invalid_sort_type: StrictStr = Field(alias="invalidSortType") __properties: ClassVar[Set[str]] = set(("invalidSortType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_transaction_type.py b/foundry/models/invalid_transaction_type.py index 99069d828..3e104906e 100644 --- a/foundry/models/invalid_transaction_type.py +++ b/foundry/models/invalid_transaction_type.py @@ -38,29 +38,28 @@ from foundry.models.invalid_transaction_type_parameters import InvalidTransactionTypeParameters from typing_extensions import Self + class InvalidTransactionType(BaseModel): """ The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidTransactionTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_transaction_type_parameters.py b/foundry/models/invalid_transaction_type_parameters.py index 4c92d6861..572d862aa 100644 --- a/foundry/models/invalid_transaction_type_parameters.py +++ b/foundry/models/invalid_transaction_type_parameters.py @@ -38,21 +38,24 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self + class InvalidTransactionTypeParameters(BaseModel): """ InvalidTransactionTypeParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) transaction_type: TransactionType = Field(alias="transactionType") __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_user_id.py b/foundry/models/invalid_user_id.py index 73b503a08..ce14408be 100644 --- a/foundry/models/invalid_user_id.py +++ b/foundry/models/invalid_user_id.py @@ -38,29 +38,28 @@ from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters from typing_extensions import Self + class InvalidUserId(BaseModel): """ The provided value for a user id must be a UUID. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidUserIdParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/invalid_user_id_parameters.py b/foundry/models/invalid_user_id_parameters.py index f24455213..546bb942b 100644 --- a/foundry/models/invalid_user_id_parameters.py +++ b/foundry/models/invalid_user_id_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class InvalidUserIdParameters(BaseModel): """ InvalidUserIdParameters - """ # noqa: E501 + """ # noqa: E501 + user_id: StrictStr = Field(alias="userId") __properties: ClassVar[Set[str]] = set(("userId")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/language_model_source.py b/foundry/models/language_model_source.py index d4ca40ebe..616e2d62d 100644 --- a/foundry/models/language_model_source.py +++ b/foundry/models/language_model_source.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,12 +47,10 @@ class LanguageModelSource(str, Enum): """ allowed enum values """ - GLOBAL = 'global' - HOSTED = 'hosted' + GLOBAL = "global" + HOSTED = "hosted" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LanguageModelSource from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/language_model_source_not_supported.py b/foundry/models/language_model_source_not_supported.py index 723713ffd..b92e0ba7d 100644 --- a/foundry/models/language_model_source_not_supported.py +++ b/foundry/models/language_model_source_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.language_model_source_not_supported_parameters import LanguageModelSourceNotSupportedParameters +from foundry.models.language_model_source_not_supported_parameters import ( + LanguageModelSourceNotSupportedParameters, +) from typing_extensions import Self + class LanguageModelSourceNotSupported(BaseModel): """ LanguageModelSourceNotSupported - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LanguageModelSourceNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/language_model_source_not_supported_parameters.py b/foundry/models/language_model_source_not_supported_parameters.py index a9cbccd2f..f41860701 100644 --- a/foundry/models/language_model_source_not_supported_parameters.py +++ b/foundry/models/language_model_source_not_supported_parameters.py @@ -37,19 +37,16 @@ from foundry.models.language_model_source import LanguageModelSource from typing_extensions import Self + class LanguageModelSourceNotSupportedParameters(BaseModel): """ LanguageModelSourceNotSupportedParameters - """ # noqa: E501 + """ # noqa: E501 + source: LanguageModelSource __properties: ClassVar[Set[str]] = set(("source")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/line_string.py b/foundry/models/line_string.py index b0648ddf4..058a3caa6 100644 --- a/foundry/models/line_string.py +++ b/foundry/models/line_string.py @@ -38,21 +38,29 @@ from typing_extensions import Annotated from typing_extensions import Self + class LineString(BaseModel): """ LineString - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]] = Field(default=None, description="GeoJSon fundamental geometry construct, array of two or more positions. ") + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + Annotated[ + List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], + Field(min_length=2), + ] + ] = Field( + default=None, + description="GeoJSon fundamental geometry construct, array of two or more positions. ", + ) type: Literal["LineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +88,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +102,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_already_exists.py b/foundry/models/link_already_exists.py index 53812204a..c0be880f6 100644 --- a/foundry/models/link_already_exists.py +++ b/foundry/models/link_already_exists.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class LinkAlreadyExists(BaseModel): """ - The link the user is attempting to create already exists. - """ # noqa: E501 + The link the user is attempting to create already exists. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_not_found.py b/foundry/models/link_type_not_found.py index e8417a2a1..4efbfa7e7 100644 --- a/foundry/models/link_type_not_found.py +++ b/foundry/models/link_type_not_found.py @@ -38,29 +38,28 @@ from foundry.models.link_type_not_found_parameters import LinkTypeNotFoundParameters from typing_extensions import Self + class LinkTypeNotFound(BaseModel): """ The link type is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LinkTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_not_found_parameters.py b/foundry/models/link_type_not_found_parameters.py index 24bed4041..492460ebd 100644 --- a/foundry/models/link_type_not_found_parameters.py +++ b/foundry/models/link_type_not_found_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class LinkTypeNotFoundParameters(BaseModel): """ LinkTypeNotFoundParameters - """ # noqa: E501 - link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + """ # noqa: E501 + + link_type: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkType", + ) + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) __properties: ClassVar[Set[str]] = set(("linkType", "objectType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_side.py b/foundry/models/link_type_side.py index 2ef43e8d0..976573715 100644 --- a/foundry/models/link_type_side.py +++ b/foundry/models/link_type_side.py @@ -39,24 +39,42 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class LinkTypeSide(BaseModel): """ LinkTypeSide - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="apiName", + ) cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + foreign_key_property_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="foreignKeyPropertyApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "cardinality", + "displayName", + "foreignKeyPropertyApiName", + "objectTypeApiName", + "status", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +102,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -99,12 +116,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_side_cardinality.py b/foundry/models/link_type_side_cardinality.py index bf74fc408..54188958b 100644 --- a/foundry/models/link_type_side_cardinality.py +++ b/foundry/models/link_type_side_cardinality.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,12 +47,10 @@ class LinkTypeSideCardinality(str, Enum): """ allowed enum values """ - ONE = 'ONE' - MANY = 'MANY' + ONE = "ONE" + MANY = "MANY" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LinkTypeSideCardinality from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/link_type_side_v2.py b/foundry/models/link_type_side_v2.py index 5cffe22ba..f9b964386 100644 --- a/foundry/models/link_type_side_v2.py +++ b/foundry/models/link_type_side_v2.py @@ -39,24 +39,42 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class LinkTypeSideV2(BaseModel): """ LinkTypeSideV2 - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="apiName", + ) cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + foreign_key_property_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="foreignKeyPropertyApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "cardinality", + "displayName", + "foreignKeyPropertyApiName", + "objectTypeApiName", + "status", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +102,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -99,12 +116,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/linked_object_not_found.py b/foundry/models/linked_object_not_found.py index 0f2bf4ce8..aa5698483 100644 --- a/foundry/models/linked_object_not_found.py +++ b/foundry/models/linked_object_not_found.py @@ -38,29 +38,28 @@ from foundry.models.linked_object_not_found_parameters import LinkedObjectNotFoundParameters from typing_extensions import Self + class LinkedObjectNotFound(BaseModel): """ The linked object with the given primary key is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: LinkedObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/linked_object_not_found_parameters.py b/foundry/models/linked_object_not_found_parameters.py index cb22690e6..4bfb615a4 100644 --- a/foundry/models/linked_object_not_found_parameters.py +++ b/foundry/models/linked_object_not_found_parameters.py @@ -37,21 +37,28 @@ from pydantic import Field from typing_extensions import Self + class LinkedObjectNotFoundParameters(BaseModel): """ LinkedObjectNotFoundParameters - """ # noqa: E501 - link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") - linked_object_primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="linkedObjectPrimaryKey") - linked_object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="linkedObjectType") - __properties: ClassVar[Set[str]] = set(("linkType", "linkedObjectPrimaryKey", "linkedObjectType")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + """ # noqa: E501 + + link_type: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkType", + ) + linked_object_primary_key: Optional[Dict[str, Any]] = Field( + default=None, alias="linkedObjectPrimaryKey" + ) + linked_object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="linkedObjectType", + ) + __properties: ClassVar[Set[str]] = set( + ("linkType", "linkedObjectPrimaryKey", "linkedObjectType") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_action_types_response.py b/foundry/models/list_action_types_response.py index 5764c23c5..ddc1154aa 100644 --- a/foundry/models/list_action_types_response.py +++ b/foundry/models/list_action_types_response.py @@ -38,20 +38,21 @@ from foundry.models.action_type import ActionType from typing_extensions import Self + class ListActionTypesResponse(BaseModel): """ ListActionTypesResponse - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[ActionType]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_action_types_response_v2.py b/foundry/models/list_action_types_response_v2.py index 8ade15754..8ec108e8e 100644 --- a/foundry/models/list_action_types_response_v2.py +++ b/foundry/models/list_action_types_response_v2.py @@ -38,20 +38,21 @@ from foundry.models.action_type_v2 import ActionTypeV2 from typing_extensions import Self + class ListActionTypesResponseV2(BaseModel): """ ListActionTypesResponseV2 - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[ActionTypeV2]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_branches_response.py b/foundry/models/list_branches_response.py index 3927e363b..d6e2c905e 100644 --- a/foundry/models/list_branches_response.py +++ b/foundry/models/list_branches_response.py @@ -38,20 +38,23 @@ from foundry.models.branch import Branch from typing_extensions import Self + class ListBranchesResponse(BaseModel): """ ListBranchesResponse - """ # noqa: E501 - data: Optional[List[Branch]] = Field(default=None, description="The list of branches in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[Branch]] = Field( + default=None, description="The list of branches in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_deployments_response.py b/foundry/models/list_deployments_response.py index 904c04b6f..6c2537255 100644 --- a/foundry/models/list_deployments_response.py +++ b/foundry/models/list_deployments_response.py @@ -37,19 +37,16 @@ from foundry.models.deployment_listing import DeploymentListing from typing_extensions import Self + class ListDeploymentsResponse(BaseModel): """ ListDeploymentsResponse - """ # noqa: E501 + """ # noqa: E501 + deployments: Optional[List[DeploymentListing]] = None __properties: ClassVar[Set[str]] = set(("deployments")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in deployments (list) @@ -87,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.deployments: if _item: _items.append(_item.to_dict()) - _dict['deployments'] = _items + _dict["deployments"] = _items return _dict @classmethod @@ -99,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_files_response.py b/foundry/models/list_files_response.py index a58b7d14d..46b45e632 100644 --- a/foundry/models/list_files_response.py +++ b/foundry/models/list_files_response.py @@ -38,20 +38,21 @@ from foundry.models.file import File from typing_extensions import Self + class ListFilesResponse(BaseModel): """ A page of Files and an optional page token that can be used to retrieve the next page. - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[File]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_object_types_response.py b/foundry/models/list_object_types_response.py index f21235de7..d07e6618b 100644 --- a/foundry/models/list_object_types_response.py +++ b/foundry/models/list_object_types_response.py @@ -38,20 +38,23 @@ from foundry.models.object_type import ObjectType from typing_extensions import Self + class ListObjectTypesResponse(BaseModel): """ ListObjectTypesResponse - """ # noqa: E501 - data: Optional[List[ObjectType]] = Field(default=None, description="The list of object types in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[ObjectType]] = Field( + default=None, description="The list of object types in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_object_types_v2_response.py b/foundry/models/list_object_types_v2_response.py index 361d10991..9e963bb67 100644 --- a/foundry/models/list_object_types_v2_response.py +++ b/foundry/models/list_object_types_v2_response.py @@ -38,20 +38,23 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self + class ListObjectTypesV2Response(BaseModel): """ ListObjectTypesV2Response - """ # noqa: E501 - data: Optional[List[ObjectTypeV2]] = Field(default=None, description="The list of object types in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[ObjectTypeV2]] = Field( + default=None, description="The list of object types in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_ontologies_response.py b/foundry/models/list_ontologies_response.py index 5dc17ca14..7a83d1e54 100644 --- a/foundry/models/list_ontologies_response.py +++ b/foundry/models/list_ontologies_response.py @@ -38,19 +38,18 @@ from foundry.models.ontology import Ontology from typing_extensions import Self + class ListOntologiesResponse(BaseModel): """ ListOntologiesResponse - """ # noqa: E501 - data: Optional[List[Ontology]] = Field(default=None, description="The list of Ontologies the user has access to.") - __properties: ClassVar[Set[str]] = set(("data")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + data: Optional[List[Ontology]] = Field( + default=None, description="The list of Ontologies the user has access to." + ) + __properties: ClassVar[Set[str]] = set(("data")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -100,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_ontologies_v2_response.py b/foundry/models/list_ontologies_v2_response.py index 262395847..12b880f7c 100644 --- a/foundry/models/list_ontologies_v2_response.py +++ b/foundry/models/list_ontologies_v2_response.py @@ -38,19 +38,18 @@ from foundry.models.ontology_v2 import OntologyV2 from typing_extensions import Self + class ListOntologiesV2Response(BaseModel): """ ListOntologiesV2Response - """ # noqa: E501 - data: Optional[List[OntologyV2]] = Field(default=None, description="The list of Ontologies the user has access to.") - __properties: ClassVar[Set[str]] = set(("data")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + data: Optional[List[OntologyV2]] = Field( + default=None, description="The list of Ontologies the user has access to." + ) + __properties: ClassVar[Set[str]] = set(("data")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -100,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_outgoing_link_types_response.py b/foundry/models/list_outgoing_link_types_response.py index 4ac325ce5..17e5d4a88 100644 --- a/foundry/models/list_outgoing_link_types_response.py +++ b/foundry/models/list_outgoing_link_types_response.py @@ -38,20 +38,23 @@ from foundry.models.link_type_side import LinkTypeSide from typing_extensions import Self + class ListOutgoingLinkTypesResponse(BaseModel): """ ListOutgoingLinkTypesResponse - """ # noqa: E501 - data: Optional[List[LinkTypeSide]] = Field(default=None, description="The list of link type sides in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[LinkTypeSide]] = Field( + default=None, description="The list of link type sides in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_outgoing_link_types_response_v2.py b/foundry/models/list_outgoing_link_types_response_v2.py index d41bcdecf..20abfd54f 100644 --- a/foundry/models/list_outgoing_link_types_response_v2.py +++ b/foundry/models/list_outgoing_link_types_response_v2.py @@ -38,20 +38,23 @@ from foundry.models.link_type_side_v2 import LinkTypeSideV2 from typing_extensions import Self + class ListOutgoingLinkTypesResponseV2(BaseModel): """ ListOutgoingLinkTypesResponseV2 - """ # noqa: E501 - data: Optional[List[LinkTypeSideV2]] = Field(default=None, description="The list of link type sides in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[LinkTypeSideV2]] = Field( + default=None, description="The list of link type sides in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_query_types_response.py b/foundry/models/list_query_types_response.py index ff3697f04..e64275770 100644 --- a/foundry/models/list_query_types_response.py +++ b/foundry/models/list_query_types_response.py @@ -38,20 +38,21 @@ from foundry.models.query_type import QueryType from typing_extensions import Self + class ListQueryTypesResponse(BaseModel): """ ListQueryTypesResponse - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[QueryType]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_query_types_response_v2.py b/foundry/models/list_query_types_response_v2.py index 54c39ce52..090d061dd 100644 --- a/foundry/models/list_query_types_response_v2.py +++ b/foundry/models/list_query_types_response_v2.py @@ -38,20 +38,21 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self + class ListQueryTypesResponseV2(BaseModel): """ ListQueryTypesResponseV2 - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[QueryTypeV2]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/logic_rule.py b/foundry/models/logic_rule.py index 5948cca46..991de14ba 100644 --- a/foundry/models/logic_rule.py +++ b/foundry/models/logic_rule.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -46,13 +47,13 @@ from foundry.models.modify_object_rule import ModifyObjectRule - """ LogicRule """ -LogicRule = Annotated[Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], Field(discriminator="type")] - - +LogicRule = Annotated[ + Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/long_type.py b/foundry/models/long_type.py index e2234d664..24dd2e1c2 100644 --- a/foundry/models/long_type.py +++ b/foundry/models/long_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class LongType(BaseModel): """ LongType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["long"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/malformed_property_filters.py b/foundry/models/malformed_property_filters.py index 685101ed3..b00ea444d 100644 --- a/foundry/models/malformed_property_filters.py +++ b/foundry/models/malformed_property_filters.py @@ -38,29 +38,28 @@ from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters from typing_extensions import Self + class MalformedPropertyFilters(BaseModel): """ - At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. - """ # noqa: E501 + At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MalformedPropertyFiltersParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/malformed_property_filters_parameters.py b/foundry/models/malformed_property_filters_parameters.py index 034474d9a..6557a1021 100644 --- a/foundry/models/malformed_property_filters_parameters.py +++ b/foundry/models/malformed_property_filters_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class MalformedPropertyFiltersParameters(BaseModel): """ MalformedPropertyFiltersParameters - """ # noqa: E501 + """ # noqa: E501 + malformed_property_filter: StrictStr = Field(alias="malformedPropertyFilter") __properties: ClassVar[Set[str]] = set(("malformedPropertyFilter")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_action_mapping_not_found.py b/foundry/models/marketplace_action_mapping_not_found.py index c242e1de5..7d0e335d5 100644 --- a/foundry/models/marketplace_action_mapping_not_found.py +++ b/foundry/models/marketplace_action_mapping_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_action_mapping_not_found_parameters import MarketplaceActionMappingNotFoundParameters +from foundry.models.marketplace_action_mapping_not_found_parameters import ( + MarketplaceActionMappingNotFoundParameters, +) from typing_extensions import Self + class MarketplaceActionMappingNotFound(BaseModel): """ The given action could not be mapped to a Marketplace installation. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceActionMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_action_mapping_not_found_parameters.py b/foundry/models/marketplace_action_mapping_not_found_parameters.py index 4bb52f30d..a2eac26be 100644 --- a/foundry/models/marketplace_action_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_action_mapping_not_found_parameters.py @@ -37,21 +37,21 @@ from pydantic import Field from typing_extensions import Self + class MarketplaceActionMappingNotFoundParameters(BaseModel): """ MarketplaceActionMappingNotFoundParameters - """ # noqa: E501 - action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") + """ # noqa: E501 + + action_type: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="actionType", + ) artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("actionType", "artifactRepository", "packageName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +79,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_installation_not_found.py b/foundry/models/marketplace_installation_not_found.py index 28b1ef821..75edc706b 100644 --- a/foundry/models/marketplace_installation_not_found.py +++ b/foundry/models/marketplace_installation_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_installation_not_found_parameters import MarketplaceInstallationNotFoundParameters +from foundry.models.marketplace_installation_not_found_parameters import ( + MarketplaceInstallationNotFoundParameters, +) from typing_extensions import Self + class MarketplaceInstallationNotFound(BaseModel): """ - The given marketplace installation could not be found or the user does not have access to it. - """ # noqa: E501 + The given marketplace installation could not be found or the user does not have access to it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceInstallationNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_installation_not_found_parameters.py b/foundry/models/marketplace_installation_not_found_parameters.py index 011a528b1..182713213 100644 --- a/foundry/models/marketplace_installation_not_found_parameters.py +++ b/foundry/models/marketplace_installation_not_found_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class MarketplaceInstallationNotFoundParameters(BaseModel): """ MarketplaceInstallationNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_link_mapping_not_found.py b/foundry/models/marketplace_link_mapping_not_found.py index 4ed5796f6..a7e14c3f7 100644 --- a/foundry/models/marketplace_link_mapping_not_found.py +++ b/foundry/models/marketplace_link_mapping_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_link_mapping_not_found_parameters import MarketplaceLinkMappingNotFoundParameters +from foundry.models.marketplace_link_mapping_not_found_parameters import ( + MarketplaceLinkMappingNotFoundParameters, +) from typing_extensions import Self + class MarketplaceLinkMappingNotFound(BaseModel): """ The given link could not be mapped to a Marketplace installation. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceLinkMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_link_mapping_not_found_parameters.py b/foundry/models/marketplace_link_mapping_not_found_parameters.py index 769acd407..aed6ec532 100644 --- a/foundry/models/marketplace_link_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_link_mapping_not_found_parameters.py @@ -37,22 +37,27 @@ from pydantic import Field from typing_extensions import Self + class MarketplaceLinkMappingNotFoundParameters(BaseModel): """ MarketplaceLinkMappingNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + artifact_repository: StrictStr = Field(alias="artifactRepository") - link_type: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkType") - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + link_type: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkType", + ) + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set(("artifactRepository", "linkType", "objectType", "packageName")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("artifactRepository", "linkType", "objectType", "packageName") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +99,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_object_mapping_not_found.py b/foundry/models/marketplace_object_mapping_not_found.py index 83cdb0c47..5545414bc 100644 --- a/foundry/models/marketplace_object_mapping_not_found.py +++ b/foundry/models/marketplace_object_mapping_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_object_mapping_not_found_parameters import MarketplaceObjectMappingNotFoundParameters +from foundry.models.marketplace_object_mapping_not_found_parameters import ( + MarketplaceObjectMappingNotFoundParameters, +) from typing_extensions import Self + class MarketplaceObjectMappingNotFound(BaseModel): """ The given object could not be mapped to a Marketplace installation. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceObjectMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_object_mapping_not_found_parameters.py b/foundry/models/marketplace_object_mapping_not_found_parameters.py index ddd93c421..2a567dd80 100644 --- a/foundry/models/marketplace_object_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_object_mapping_not_found_parameters.py @@ -37,21 +37,21 @@ from pydantic import Field from typing_extensions import Self + class MarketplaceObjectMappingNotFoundParameters(BaseModel): """ MarketplaceObjectMappingNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + artifact_repository: StrictStr = Field(alias="artifactRepository") - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) package_name: StrictStr = Field(alias="packageName") __properties: ClassVar[Set[str]] = set(("artifactRepository", "objectType", "packageName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +79,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_query_mapping_not_found.py b/foundry/models/marketplace_query_mapping_not_found.py index a6669eb19..81c489b37 100644 --- a/foundry/models/marketplace_query_mapping_not_found.py +++ b/foundry/models/marketplace_query_mapping_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.marketplace_query_mapping_not_found_parameters import MarketplaceQueryMappingNotFoundParameters +from foundry.models.marketplace_query_mapping_not_found_parameters import ( + MarketplaceQueryMappingNotFoundParameters, +) from typing_extensions import Self + class MarketplaceQueryMappingNotFound(BaseModel): """ The given query could not be mapped to a Marketplace installation. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MarketplaceQueryMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/marketplace_query_mapping_not_found_parameters.py b/foundry/models/marketplace_query_mapping_not_found_parameters.py index db550f324..fcb37c35d 100644 --- a/foundry/models/marketplace_query_mapping_not_found_parameters.py +++ b/foundry/models/marketplace_query_mapping_not_found_parameters.py @@ -37,21 +37,20 @@ from pydantic import Field from typing_extensions import Self + class MarketplaceQueryMappingNotFoundParameters(BaseModel): """ MarketplaceQueryMappingNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + artifact_repository: StrictStr = Field(alias="artifactRepository") package_name: StrictStr = Field(alias="packageName") - query_type: StrictStr = Field(description="The name of the Query in the API. ", alias="queryType") + query_type: StrictStr = Field( + description="The name of the Query in the API. ", alias="queryType" + ) __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName", "queryType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/missing_parameter.py b/foundry/models/missing_parameter.py index 97408f417..0ce1a8997 100644 --- a/foundry/models/missing_parameter.py +++ b/foundry/models/missing_parameter.py @@ -38,29 +38,28 @@ from foundry.models.missing_parameter_parameters import MissingParameterParameters from typing_extensions import Self + class MissingParameter(BaseModel): """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. - """ # noqa: E501 + Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MissingParameterParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/missing_parameter_parameters.py b/foundry/models/missing_parameter_parameters.py index 96dfc2ec3..b52324bbe 100644 --- a/foundry/models/missing_parameter_parameters.py +++ b/foundry/models/missing_parameter_parameters.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class MissingParameterParameters(BaseModel): """ MissingParameterParameters - """ # noqa: E501 + """ # noqa: E501 + parameters: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("parameters")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/missing_post_body.py b/foundry/models/missing_post_body.py index 33c6bff42..f6ea6020e 100644 --- a/foundry/models/missing_post_body.py +++ b/foundry/models/missing_post_body.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class MissingPostBody(BaseModel): """ A post body is required for this endpoint, but was not found in the request. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/model_api_data_type.py b/foundry/models/model_api_data_type.py index b2fa653d6..ee9e829a4 100644 --- a/foundry/models/model_api_data_type.py +++ b/foundry/models/model_api_data_type.py @@ -38,21 +38,18 @@ from foundry.models.model_api_type import ModelApiType from typing_extensions import Self + class ModelApiDataType(BaseModel): """ - An object definition representing an input or an output type for the deployment API. - """ # noqa: E501 + An object definition representing an input or an output type for the deployment API. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of a field. ") property_type: Optional[ModelApiType] = Field(default=None, alias="propertyType") required: Optional[StrictBool] = None __properties: ClassVar[Set[str]] = set(("name", "propertyType", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +77,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of property_type if self.property_type: - _dict['propertyType'] = self.property_type.to_dict() + _dict["propertyType"] = self.property_type.to_dict() return _dict @classmethod @@ -98,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/model_api_type.py b/foundry/models/model_api_type.py index 6adf3b44d..9a25740ed 100644 --- a/foundry/models/model_api_type.py +++ b/foundry/models/model_api_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -55,17 +56,13 @@ class ModelApiUnionType(BaseModel): """ ModelApiUnionType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["union"] union_types: Optional[List[ModelApiType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -93,8 +90,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -103,7 +99,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict['unionTypes'] = _items + _dict["unionTypes"] = _items return _dict @classmethod @@ -115,31 +111,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiUnionType.model_rebuild(raise_errors=False) + class ModelApiStructField(BaseModel): """ ModelApiStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: ModelApiType = Field(alias="fieldType") name: StrictStr __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -167,13 +161,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -185,31 +178,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiStructField.model_rebuild(raise_errors=False) + class ModelApiStructType(BaseModel): """ ModelApiStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[ModelApiStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -237,8 +228,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -247,7 +237,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -259,32 +249,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiStructType.model_rebuild(raise_errors=False) + class ModelApiMapType(BaseModel): """ ModelApiMapType - """ # noqa: E501 + """ # noqa: E501 + key_type: ModelApiType = Field(alias="keyType") type: Literal["map"] value_type: ModelApiType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -312,16 +300,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -333,31 +320,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiMapType.model_rebuild(raise_errors=False) + class ModelApiArrayType(BaseModel): """ ModelApiArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ModelApiType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -385,13 +370,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -403,14 +387,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiArrayType.model_rebuild(raise_errors=False) @@ -418,9 +403,23 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by models. """ -ModelApiType = Annotated[Union[AnyType, BooleanType, DateType, FloatType, IntegerType, ModelApiArrayType, ModelApiMapType, ModelApiStructType, ModelApiUnionType, NullType, StringType, TimestampType], Field(discriminator="type")] - - +ModelApiType = Annotated[ + Union[ + AnyType, + BooleanType, + DateType, + FloatType, + IntegerType, + ModelApiArrayType, + ModelApiMapType, + ModelApiStructType, + ModelApiUnionType, + NullType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/model_property.py b/foundry/models/model_property.py index 1d773bf2e..e2c5ba4c6 100644 --- a/foundry/models/model_property.py +++ b/foundry/models/model_property.py @@ -37,21 +37,23 @@ from pydantic import Field from typing_extensions import Self + class ModelProperty(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") + """ # noqa: E501 + + base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="baseType", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) __properties: ClassVar[Set[str]] = set(("baseType", "description", "displayName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/modify_object_rule.py b/foundry/models/modify_object_rule.py index 9f3331ff3..ad80aae8d 100644 --- a/foundry/models/modify_object_rule.py +++ b/foundry/models/modify_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class ModifyObjectRule(BaseModel): """ ModifyObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["modifyObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_line_string.py b/foundry/models/multi_line_string.py index 2fbd194d9..0984b4d8d 100644 --- a/foundry/models/multi_line_string.py +++ b/foundry/models/multi_line_string.py @@ -38,21 +38,32 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiLineString(BaseModel): """ MultiLineString - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=2), + ] + ] + ] = None type: Literal["MultiLineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_point.py b/foundry/models/multi_point.py index 31277bba6..ab905a5ed 100644 --- a/foundry/models/multi_point.py +++ b/foundry/models/multi_point.py @@ -38,21 +38,23 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiPoint(BaseModel): """ MultiPoint - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]] + ] = None type: Literal["MultiPoint"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_polygon.py b/foundry/models/multi_polygon.py index b336bb887..e5afbf19e 100644 --- a/foundry/models/multi_polygon.py +++ b/foundry/models/multi_polygon.py @@ -38,21 +38,34 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiPolygon(BaseModel): """ MultiPolygon - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=4), + ] + ] + ] + ] = None type: Literal["MultiPolygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +93,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +107,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multiple_group_by_on_field_not_supported.py b/foundry/models/multiple_group_by_on_field_not_supported.py index 331fad746..0745693a4 100644 --- a/foundry/models/multiple_group_by_on_field_not_supported.py +++ b/foundry/models/multiple_group_by_on_field_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.multiple_group_by_on_field_not_supported_parameters import MultipleGroupByOnFieldNotSupportedParameters +from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( + MultipleGroupByOnFieldNotSupportedParameters, +) from typing_extensions import Self + class MultipleGroupByOnFieldNotSupported(BaseModel): """ - Aggregation cannot group by on the same field multiple times. - """ # noqa: E501 + Aggregation cannot group by on the same field multiple times. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MultipleGroupByOnFieldNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py b/foundry/models/multiple_group_by_on_field_not_supported_parameters.py index 880bd5da2..107f20aff 100644 --- a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py +++ b/foundry/models/multiple_group_by_on_field_not_supported_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class MultipleGroupByOnFieldNotSupportedParameters(BaseModel): """ MultipleGroupByOnFieldNotSupportedParameters - """ # noqa: E501 + """ # noqa: E501 + duplicate_fields: Optional[List[StrictStr]] = Field(default=None, alias="duplicateFields") __properties: ClassVar[Set[str]] = set(("duplicateFields")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multiple_property_values_not_supported.py b/foundry/models/multiple_property_values_not_supported.py index 659ca088a..6cd186ffd 100644 --- a/foundry/models/multiple_property_values_not_supported.py +++ b/foundry/models/multiple_property_values_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.multiple_property_values_not_supported_parameters import MultiplePropertyValuesNotSupportedParameters +from foundry.models.multiple_property_values_not_supported_parameters import ( + MultiplePropertyValuesNotSupportedParameters, +) from typing_extensions import Self + class MultiplePropertyValuesNotSupported(BaseModel): """ - One of the requested property filters does not support multiple values. Please include only a single value for it. - """ # noqa: E501 + One of the requested property filters does not support multiple values. Please include only a single value for it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: MultiplePropertyValuesNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multiple_property_values_not_supported_parameters.py b/foundry/models/multiple_property_values_not_supported_parameters.py index b87533af3..aef463428 100644 --- a/foundry/models/multiple_property_values_not_supported_parameters.py +++ b/foundry/models/multiple_property_values_not_supported_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class MultiplePropertyValuesNotSupportedParameters(BaseModel): """ MultiplePropertyValuesNotSupportedParameters - """ # noqa: E501 - var_property: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="property") - property_filter: StrictStr = Field(description="Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ", alias="propertyFilter") + """ # noqa: E501 + + var_property: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="property", + ) + property_filter: StrictStr = Field( + description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', + alias="propertyFilter", + ) __properties: ClassVar[Set[str]] = set(("property", "propertyFilter")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/null_type.py b/foundry/models/null_type.py index c7c4a45f0..4ce134496 100644 --- a/foundry/models/null_type.py +++ b/foundry/models/null_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class NullType(BaseModel): """ NullType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["null"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_already_exists.py b/foundry/models/object_already_exists.py index 396b92fd5..284ca285a 100644 --- a/foundry/models/object_already_exists.py +++ b/foundry/models/object_already_exists.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ObjectAlreadyExists(BaseModel): """ - The object the user is attempting to create already exists. - """ # noqa: E501 + The object the user is attempting to create already exists. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_changed.py b/foundry/models/object_changed.py index c86ca9bad..360aabdfc 100644 --- a/foundry/models/object_changed.py +++ b/foundry/models/object_changed.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ObjectChanged(BaseModel): """ - An object used by this `Action` was changed by someone else while the `Action` was running. - """ # noqa: E501 + An object used by this `Action` was changed by someone else while the `Action` was running. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_not_found.py b/foundry/models/object_not_found.py index 142f4b2ba..f8111d35b 100644 --- a/foundry/models/object_not_found.py +++ b/foundry/models/object_not_found.py @@ -38,29 +38,28 @@ from foundry.models.object_not_found_parameters import ObjectNotFoundParameters from typing_extensions import Self + class ObjectNotFound(BaseModel): """ The requested object is not found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_not_found_parameters.py b/foundry/models/object_not_found_parameters.py index 6a1b401d0..bd1afee52 100644 --- a/foundry/models/object_not_found_parameters.py +++ b/foundry/models/object_not_found_parameters.py @@ -37,20 +37,21 @@ from pydantic import Field from typing_extensions import Self + class ObjectNotFoundParameters(BaseModel): """ ObjectNotFoundParameters - """ # noqa: E501 - object_type: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + """ # noqa: E501 + + object_type: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +79,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_property_type.py b/foundry/models/object_property_type.py index 43d142b5b..7313f363b 100644 --- a/foundry/models/object_property_type.py +++ b/foundry/models/object_property_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -62,17 +63,13 @@ class OntologyObjectArrayType(BaseModel): """ OntologyObjectArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ObjectPropertyType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -100,13 +97,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -118,14 +114,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyObjectArrayType.model_rebuild(raise_errors=False) @@ -133,9 +130,27 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Object properties. """ -ObjectPropertyType = Annotated[Union[AttachmentType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, GeoPointType, GeoShapeType, IntegerType, LongType, OntologyObjectArrayType, ShortType, StringType, TimeseriesType, TimestampType], Field(discriminator="type")] - - +ObjectPropertyType = Annotated[ + Union[ + AttachmentType, + BooleanType, + ByteType, + DateType, + DecimalType, + DoubleType, + FloatType, + GeoPointType, + GeoShapeType, + IntegerType, + LongType, + OntologyObjectArrayType, + ShortType, + StringType, + TimeseriesType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/object_type.py b/foundry/models/object_type.py index be77397c3..f406f6a13 100644 --- a/foundry/models/object_type.py +++ b/foundry/models/object_type.py @@ -40,26 +40,49 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ObjectType(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") - primary_key: Optional[List[StrictStr]] = Field(default=None, description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", alias="primaryKey") - properties: Optional[Dict[str, ModelProperty]] = Field(default=None, description="A map of the properties of the object type.") - rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) + description: Optional[StrictStr] = Field( + default=None, description="The description of the object type." + ) + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) + primary_key: Optional[List[StrictStr]] = Field( + default=None, + description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", + alias="primaryKey", + ) + properties: Optional[Dict[str, ModelProperty]] = Field( + default=None, description="A map of the properties of the object type." + ) + rid: StrictStr = Field( + description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." + ) status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "description", + "displayName", + "primaryKey", + "properties", + "rid", + "status", + "visibility", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +110,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -97,7 +119,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict['properties'] = _field_dict + _dict["properties"] = _field_dict return _dict @classmethod @@ -109,12 +131,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_not_found.py b/foundry/models/object_type_not_found.py index 5021c67e2..1aea30d14 100644 --- a/foundry/models/object_type_not_found.py +++ b/foundry/models/object_type_not_found.py @@ -38,29 +38,28 @@ from foundry.models.object_type_not_found_parameters import ObjectTypeNotFoundParameters from typing_extensions import Self + class ObjectTypeNotFound(BaseModel): """ The requested object type is not found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_not_found_parameters.py b/foundry/models/object_type_not_found_parameters.py index 15f02b75e..d7544a146 100644 --- a/foundry/models/object_type_not_found_parameters.py +++ b/foundry/models/object_type_not_found_parameters.py @@ -37,20 +37,25 @@ from pydantic import Field from typing_extensions import Self + class ObjectTypeNotFoundParameters(BaseModel): """ ObjectTypeNotFoundParameters - """ # noqa: E501 - object_type: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") - object_type_rid: Optional[StrictStr] = Field(default=None, description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.", alias="objectTypeRid") + """ # noqa: E501 + + object_type: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) + object_type_rid: Optional[StrictStr] = Field( + default=None, + description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.", + alias="objectTypeRid", + ) __properties: ClassVar[Set[str]] = set(("objectType", "objectTypeRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_not_synced.py b/foundry/models/object_type_not_synced.py index bbd7e7fa0..27c5715c0 100644 --- a/foundry/models/object_type_not_synced.py +++ b/foundry/models/object_type_not_synced.py @@ -38,29 +38,28 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self + class ObjectTypeNotSynced(BaseModel): """ - The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. - """ # noqa: E501 + The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_not_synced_parameters.py b/foundry/models/object_type_not_synced_parameters.py index 0b90146f6..55e1510dd 100644 --- a/foundry/models/object_type_not_synced_parameters.py +++ b/foundry/models/object_type_not_synced_parameters.py @@ -37,19 +37,19 @@ from pydantic import Field from typing_extensions import Self + class ObjectTypeNotSyncedParameters(BaseModel): """ ObjectTypeNotSyncedParameters - """ # noqa: E501 - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") - __properties: ClassVar[Set[str]] = set(("objectType")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) + __properties: ClassVar[Set[str]] = set(("objectType")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_v2.py b/foundry/models/object_type_v2.py index 6d35c1be4..73960523d 100644 --- a/foundry/models/object_type_v2.py +++ b/foundry/models/object_type_v2.py @@ -40,26 +40,48 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ObjectTypeV2(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") - primary_key: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="primaryKey") - properties: Optional[Dict[str, PropertyV2]] = Field(default=None, description="A map of the properties of the object type.") - rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) + description: Optional[StrictStr] = Field( + default=None, description="The description of the object type." + ) + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) + primary_key: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="primaryKey", + ) + properties: Optional[Dict[str, PropertyV2]] = Field( + default=None, description="A map of the properties of the object type." + ) + rid: StrictStr = Field( + description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." + ) status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "description", + "displayName", + "primaryKey", + "properties", + "rid", + "status", + "visibility", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +109,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -97,7 +118,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict['properties'] = _field_dict + _dict["properties"] = _field_dict return _dict @classmethod @@ -109,12 +130,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_visibility.py b/foundry/models/object_type_visibility.py index ca48c1875..02ba36e24 100644 --- a/foundry/models/object_type_visibility.py +++ b/foundry/models/object_type_visibility.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,13 +47,11 @@ class ObjectTypeVisibility(str, Enum): """ allowed enum values """ - NORMAL = 'NORMAL' - PROMINENT = 'PROMINENT' - HIDDEN = 'HIDDEN' + NORMAL = "NORMAL" + PROMINENT = "PROMINENT" + HIDDEN = "HIDDEN" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ObjectTypeVisibility from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/object_type_with_link.py b/foundry/models/object_type_with_link.py index 79d6e8134..7af2a30dc 100644 --- a/foundry/models/object_type_with_link.py +++ b/foundry/models/object_type_with_link.py @@ -39,20 +39,17 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self + class ObjectTypeWithLink(BaseModel): """ ObjectTypeWithLink - """ # noqa: E501 + """ # noqa: E501 + link_types: Optional[List[LinkTypeSideV2]] = Field(default=None, alias="linkTypes") object_type: ObjectTypeV2 = Field(alias="objectType") __properties: ClassVar[Set[str]] = set(("linkTypes", "objectType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in link_types (list) @@ -90,10 +86,10 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.link_types: if _item: _items.append(_item.to_dict()) - _dict['linkTypes'] = _items + _dict["linkTypes"] = _items # override the default output from pydantic by calling `to_dict()` of object_type if self.object_type: - _dict['objectType'] = self.object_type.to_dict() + _dict["objectType"] = self.object_type.to_dict() return _dict @classmethod @@ -105,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/objects_exceeded_limit.py b/foundry/models/objects_exceeded_limit.py index 10aa89163..fd7e0c47a 100644 --- a/foundry/models/objects_exceeded_limit.py +++ b/foundry/models/objects_exceeded_limit.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ObjectsExceededLimit(BaseModel): """ - There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. - """ # noqa: E501 + There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology.py b/foundry/models/ontology.py index 2a827d4d7..1715c3703 100644 --- a/foundry/models/ontology.py +++ b/foundry/models/ontology.py @@ -37,22 +37,23 @@ from pydantic import Field from typing_extensions import Self + class Ontology(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + rid: StrictStr = Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " + ) __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_data_type.py b/foundry/models/ontology_data_type.py index 93c81fbf4..cf174a385 100644 --- a/foundry/models/ontology_data_type.py +++ b/foundry/models/ontology_data_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -63,18 +64,14 @@ class OntologyStructField(BaseModel): """ OntologyStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: OntologyDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") required: StrictBool __properties: ClassVar[Set[str]] = set(("fieldType", "name", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,13 +99,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -120,31 +116,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyStructField.model_rebuild(raise_errors=False) + class OntologyStructType(BaseModel): """ OntologyStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[OntologyStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -172,8 +166,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -182,7 +175,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -194,31 +187,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyStructType.model_rebuild(raise_errors=False) + class OntologySetType(BaseModel): """ OntologySetType - """ # noqa: E501 + """ # noqa: E501 + item_type: OntologyDataType = Field(alias="itemType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -246,13 +237,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -264,32 +254,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologySetType.model_rebuild(raise_errors=False) + class OntologyMapType(BaseModel): """ OntologyMapType - """ # noqa: E501 + """ # noqa: E501 + key_type: OntologyDataType = Field(alias="keyType") type: Literal["map"] value_type: OntologyDataType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -317,16 +305,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -338,31 +325,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyMapType.model_rebuild(raise_errors=False) + class OntologyArrayType(BaseModel): """ OntologyArrayType - """ # noqa: E501 + """ # noqa: E501 + item_type: OntologyDataType = Field(alias="itemType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -390,13 +375,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -408,14 +392,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyArrayType.model_rebuild(raise_errors=False) @@ -423,9 +408,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the primitive types used by Palantir's Ontology-based products. """ -OntologyDataType = Annotated[Union[AnyType, BinaryType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, IntegerType, LongType, OntologyArrayType, OntologyMapType, OntologyObjectSetType, OntologyObjectType, OntologySetType, OntologyStructType, ShortType, StringType, TimestampType, UnsupportedType], Field(discriminator="type")] - - +OntologyDataType = Annotated[ + Union[ + AnyType, + BinaryType, + BooleanType, + ByteType, + DateType, + DecimalType, + DoubleType, + FloatType, + IntegerType, + LongType, + OntologyArrayType, + OntologyMapType, + OntologyObjectSetType, + OntologyObjectType, + OntologySetType, + OntologyStructType, + ShortType, + StringType, + TimestampType, + UnsupportedType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/ontology_edits_exceeded_limit.py b/foundry/models/ontology_edits_exceeded_limit.py index 4df511cfc..64f6fcc34 100644 --- a/foundry/models/ontology_edits_exceeded_limit.py +++ b/foundry/models/ontology_edits_exceeded_limit.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.ontology_edits_exceeded_limit_parameters import OntologyEditsExceededLimitParameters +from foundry.models.ontology_edits_exceeded_limit_parameters import ( + OntologyEditsExceededLimitParameters, +) from typing_extensions import Self + class OntologyEditsExceededLimit(BaseModel): """ - The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. - """ # noqa: E501 + The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OntologyEditsExceededLimitParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_edits_exceeded_limit_parameters.py b/foundry/models/ontology_edits_exceeded_limit_parameters.py index fa8727eb6..5f47ef472 100644 --- a/foundry/models/ontology_edits_exceeded_limit_parameters.py +++ b/foundry/models/ontology_edits_exceeded_limit_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class OntologyEditsExceededLimitParameters(BaseModel): """ OntologyEditsExceededLimitParameters - """ # noqa: E501 + """ # noqa: E501 + edits_count: StrictInt = Field(alias="editsCount") edits_limit: StrictInt = Field(alias="editsLimit") __properties: ClassVar[Set[str]] = set(("editsCount", "editsLimit")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_full_metadata.py b/foundry/models/ontology_full_metadata.py index 887cb889e..43cd31d51 100644 --- a/foundry/models/ontology_full_metadata.py +++ b/foundry/models/ontology_full_metadata.py @@ -41,22 +41,19 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self + class OntologyFullMetadata(BaseModel): """ OntologyFullMetadata - """ # noqa: E501 + """ # noqa: E501 + action_types: Optional[Dict[str, ActionTypeV2]] = Field(default=None, alias="actionTypes") object_types: Optional[Dict[str, ObjectTypeWithLink]] = Field(default=None, alias="objectTypes") ontology: OntologyV2 query_types: Optional[Dict[str, QueryTypeV2]] = Field(default=None, alias="queryTypes") __properties: ClassVar[Set[str]] = set(("actionTypes", "objectTypes", "ontology", "queryTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in action_types (dict) @@ -94,24 +90,24 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.action_types: if self.action_types[_key]: _field_dict[_key] = self.action_types[_key].to_dict() - _dict['actionTypes'] = _field_dict + _dict["actionTypes"] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in object_types (dict) _field_dict = {} if self.object_types: for _key in self.object_types: if self.object_types[_key]: _field_dict[_key] = self.object_types[_key].to_dict() - _dict['objectTypes'] = _field_dict + _dict["objectTypes"] = _field_dict # override the default output from pydantic by calling `to_dict()` of ontology if self.ontology: - _dict['ontology'] = self.ontology.to_dict() + _dict["ontology"] = self.ontology.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in query_types (dict) _field_dict = {} if self.query_types: for _key in self.query_types: if self.query_types[_key]: _field_dict[_key] = self.query_types[_key].to_dict() - _dict['queryTypes'] = _field_dict + _dict["queryTypes"] = _field_dict return _dict @classmethod @@ -123,12 +119,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_not_found.py b/foundry/models/ontology_not_found.py index c02aeab17..7c23356b2 100644 --- a/foundry/models/ontology_not_found.py +++ b/foundry/models/ontology_not_found.py @@ -38,29 +38,28 @@ from foundry.models.ontology_not_found_parameters import OntologyNotFoundParameters from typing_extensions import Self + class OntologyNotFound(BaseModel): """ The requested Ontology is not found, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OntologyNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_not_found_parameters.py b/foundry/models/ontology_not_found_parameters.py index 002184380..0fa763407 100644 --- a/foundry/models/ontology_not_found_parameters.py +++ b/foundry/models/ontology_not_found_parameters.py @@ -37,20 +37,21 @@ from pydantic import Field from typing_extensions import Self + class OntologyNotFoundParameters(BaseModel): """ OntologyNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + api_name: Optional[StrictStr] = Field(default=None, alias="apiName") - ontology_rid: Optional[StrictStr] = Field(default=None, description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ", alias="ontologyRid") + ontology_rid: Optional[StrictStr] = Field( + default=None, + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ", + alias="ontologyRid", + ) __properties: ClassVar[Set[str]] = set(("apiName", "ontologyRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +79,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_object_set_type.py b/foundry/models/ontology_object_set_type.py index a81bbc7b1..c36bbd127 100644 --- a/foundry/models/ontology_object_set_type.py +++ b/foundry/models/ontology_object_set_type.py @@ -37,21 +37,26 @@ from pydantic import Field from typing_extensions import Self + class OntologyObjectSetType(BaseModel): """ OntologyObjectSetType - """ # noqa: E501 - object_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") - object_type_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectApiName", + ) + object_type_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["objectSet"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_object_type.py b/foundry/models/ontology_object_type.py index 95d259811..8ab4a458f 100644 --- a/foundry/models/ontology_object_type.py +++ b/foundry/models/ontology_object_type.py @@ -37,21 +37,24 @@ from pydantic import Field from typing_extensions import Self + class OntologyObjectType(BaseModel): """ OntologyObjectType - """ # noqa: E501 - object_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["object"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_syncing.py b/foundry/models/ontology_syncing.py index 58f00fe82..d27bb050b 100644 --- a/foundry/models/ontology_syncing.py +++ b/foundry/models/ontology_syncing.py @@ -38,29 +38,28 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self + class OntologySyncing(BaseModel): """ - The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. - """ # noqa: E501 + The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_v2.py b/foundry/models/ontology_v2.py index 9b9968ef9..bf5a79da4 100644 --- a/foundry/models/ontology_v2.py +++ b/foundry/models/ontology_v2.py @@ -37,22 +37,23 @@ from pydantic import Field from typing_extensions import Self + class OntologyV2(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + rid: StrictStr = Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " + ) __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/open_transaction_already_exists.py b/foundry/models/open_transaction_already_exists.py index 7431a3844..633f04ef0 100644 --- a/foundry/models/open_transaction_already_exists.py +++ b/foundry/models/open_transaction_already_exists.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class OpenTransactionAlreadyExists(BaseModel): """ A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/operation_not_found.py b/foundry/models/operation_not_found.py index 9f1dce805..811451b0f 100644 --- a/foundry/models/operation_not_found.py +++ b/foundry/models/operation_not_found.py @@ -38,29 +38,28 @@ from foundry.models.operation_not_found_parameters import OperationNotFoundParameters from typing_extensions import Self + class OperationNotFound(BaseModel): """ The operation is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: OperationNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/operation_not_found_parameters.py b/foundry/models/operation_not_found_parameters.py index 5c81f8157..a0b8ff9d8 100644 --- a/foundry/models/operation_not_found_parameters.py +++ b/foundry/models/operation_not_found_parameters.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class OperationNotFoundParameters(BaseModel): """ OperationNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + id: StrictStr __properties: ClassVar[Set[str]] = set(("id")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter.py b/foundry/models/parameter.py index 9613dfeb9..d5065065c 100644 --- a/foundry/models/parameter.py +++ b/foundry/models/parameter.py @@ -38,22 +38,22 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self + class Parameter(BaseModel): """ Details about a parameter of an action or query. - """ # noqa: E501 - base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") + """ # noqa: E501 + + base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="baseType", + ) data_type: Optional[OntologyDataType] = Field(default=None, alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("baseType", "dataType", "description", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,13 +81,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -99,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_object_not_found.py b/foundry/models/parameter_object_not_found.py index 6dddf28ab..a4e168414 100644 --- a/foundry/models/parameter_object_not_found.py +++ b/foundry/models/parameter_object_not_found.py @@ -38,29 +38,28 @@ from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters from typing_extensions import Self + class ParameterObjectNotFound(BaseModel): """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 + The parameter object reference or parameter default value is not found, or the client token does not have access to it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_object_not_found_parameters.py b/foundry/models/parameter_object_not_found_parameters.py index 1653f2083..69a374474 100644 --- a/foundry/models/parameter_object_not_found_parameters.py +++ b/foundry/models/parameter_object_not_found_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class ParameterObjectNotFoundParameters(BaseModel): """ ParameterObjectNotFoundParameters - """ # noqa: E501 - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + """ # noqa: E501 + + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_object_set_rid_not_found.py b/foundry/models/parameter_object_set_rid_not_found.py index 52ee69bff..40bea893e 100644 --- a/foundry/models/parameter_object_set_rid_not_found.py +++ b/foundry/models/parameter_object_set_rid_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.parameter_object_set_rid_not_found_parameters import ParameterObjectSetRidNotFoundParameters +from foundry.models.parameter_object_set_rid_not_found_parameters import ( + ParameterObjectSetRidNotFoundParameters, +) from typing_extensions import Self + class ParameterObjectSetRidNotFound(BaseModel): """ - The parameter object set RID is not found, or the client token does not have access to it. - """ # noqa: E501 + The parameter object set RID is not found, or the client token does not have access to it. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterObjectSetRidNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_object_set_rid_not_found_parameters.py b/foundry/models/parameter_object_set_rid_not_found_parameters.py index 82aeb007f..20037296c 100644 --- a/foundry/models/parameter_object_set_rid_not_found_parameters.py +++ b/foundry/models/parameter_object_set_rid_not_found_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class ParameterObjectSetRidNotFoundParameters(BaseModel): """ ParameterObjectSetRidNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + object_set_rid: StrictStr = Field(alias="objectSetRid") __properties: ClassVar[Set[str]] = set(("objectSetRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_type_not_supported.py b/foundry/models/parameter_type_not_supported.py index 922058172..d8f33ac03 100644 --- a/foundry/models/parameter_type_not_supported.py +++ b/foundry/models/parameter_type_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.parameter_type_not_supported_parameters import ParameterTypeNotSupportedParameters +from foundry.models.parameter_type_not_supported_parameters import ( + ParameterTypeNotSupportedParameters, +) from typing_extensions import Self + class ParameterTypeNotSupported(BaseModel): """ - The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 + The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParameterTypeNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter_type_not_supported_parameters.py b/foundry/models/parameter_type_not_supported_parameters.py index 203b01f9e..d76a3ad96 100644 --- a/foundry/models/parameter_type_not_supported_parameters.py +++ b/foundry/models/parameter_type_not_supported_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class ParameterTypeNotSupportedParameters(BaseModel): """ ParameterTypeNotSupportedParameters - """ # noqa: E501 - parameter_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="parameterBaseType") - parameter_id: StrictStr = Field(description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", alias="parameterId") + """ # noqa: E501 + + parameter_base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="parameterBaseType", + ) + parameter_id: StrictStr = Field( + description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", + alias="parameterId", + ) __properties: ClassVar[Set[str]] = set(("parameterBaseType", "parameterId")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameters_not_found.py b/foundry/models/parameters_not_found.py index d8118d166..8517ae79c 100644 --- a/foundry/models/parameters_not_found.py +++ b/foundry/models/parameters_not_found.py @@ -38,29 +38,28 @@ from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters from typing_extensions import Self + class ParametersNotFound(BaseModel): """ - The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. - """ # noqa: E501 + The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ParametersNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameters_not_found_parameters.py b/foundry/models/parameters_not_found_parameters.py index f882797c8..88e78737f 100644 --- a/foundry/models/parameters_not_found_parameters.py +++ b/foundry/models/parameters_not_found_parameters.py @@ -37,21 +37,27 @@ from pydantic import Field from typing_extensions import Self + class ParametersNotFoundParameters(BaseModel): """ ParametersNotFoundParameters - """ # noqa: E501 - action_type: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="actionType") - configured_parameter_ids: Optional[List[StrictStr]] = Field(default=None, alias="configuredParameterIds") - unknown_parameter_ids: Optional[List[StrictStr]] = Field(default=None, alias="unknownParameterIds") - __properties: ClassVar[Set[str]] = set(("actionType", "configuredParameterIds", "unknownParameterIds")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + """ # noqa: E501 + + action_type: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="actionType", + ) + configured_parameter_ids: Optional[List[StrictStr]] = Field( + default=None, alias="configuredParameterIds" + ) + unknown_parameter_ids: Optional[List[StrictStr]] = Field( + default=None, alias="unknownParameterIds" + ) + __properties: ClassVar[Set[str]] = set( + ("actionType", "configuredParameterIds", "unknownParameterIds") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +85,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +99,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parent_attachment_permission_denied.py b/foundry/models/parent_attachment_permission_denied.py index f6a5825c4..2a472da85 100644 --- a/foundry/models/parent_attachment_permission_denied.py +++ b/foundry/models/parent_attachment_permission_denied.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class ParentAttachmentPermissionDenied(BaseModel): """ - The user does not have permission to parent attachments. - """ # noqa: E501 + The user does not have permission to parent attachments. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/polygon.py b/foundry/models/polygon.py index 933f4cb68..9b58afccb 100644 --- a/foundry/models/polygon.py +++ b/foundry/models/polygon.py @@ -38,21 +38,32 @@ from typing_extensions import Annotated from typing_extensions import Self + class Polygon(BaseModel): """ Polygon - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=4), + ] + ] + ] = None type: Literal["Polygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_filterable.py b/foundry/models/properties_not_filterable.py index ba8459514..7f9ee8560 100644 --- a/foundry/models/properties_not_filterable.py +++ b/foundry/models/properties_not_filterable.py @@ -38,29 +38,28 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self + class PropertiesNotFilterable(BaseModel): """ - Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. - """ # noqa: E501 + Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_found.py b/foundry/models/properties_not_found.py index bebdb101e..dcac52b9d 100644 --- a/foundry/models/properties_not_found.py +++ b/foundry/models/properties_not_found.py @@ -38,29 +38,28 @@ from foundry.models.properties_not_found_parameters import PropertiesNotFoundParameters from typing_extensions import Self + class PropertiesNotFound(BaseModel): """ The requested properties are not found on the object type. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertiesNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_found_parameters.py b/foundry/models/properties_not_found_parameters.py index 4cd787bc1..94e03e21a 100644 --- a/foundry/models/properties_not_found_parameters.py +++ b/foundry/models/properties_not_found_parameters.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class PropertiesNotFoundParameters(BaseModel): """ PropertiesNotFoundParameters - """ # noqa: E501 - object_type: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectType") + """ # noqa: E501 + + object_type: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectType", + ) properties: Optional[List[StrictStr]] = None __properties: ClassVar[Set[str]] = set(("objectType", "properties")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_searchable.py b/foundry/models/properties_not_searchable.py index f12acb028..12cdb2835 100644 --- a/foundry/models/properties_not_searchable.py +++ b/foundry/models/properties_not_searchable.py @@ -38,29 +38,28 @@ from foundry.models.properties_not_searchable_parameters import PropertiesNotSearchableParameters from typing_extensions import Self + class PropertiesNotSearchable(BaseModel): """ - Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. - """ # noqa: E501 + Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertiesNotSearchableParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_searchable_parameters.py b/foundry/models/properties_not_searchable_parameters.py index 00fd24dcf..edf8e3c87 100644 --- a/foundry/models/properties_not_searchable_parameters.py +++ b/foundry/models/properties_not_searchable_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class PropertiesNotSearchableParameters(BaseModel): """ PropertiesNotSearchableParameters - """ # noqa: E501 + """ # noqa: E501 + property_api_names: Optional[List[StrictStr]] = Field(default=None, alias="propertyApiNames") __properties: ClassVar[Set[str]] = set(("propertyApiNames")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/properties_not_sortable.py b/foundry/models/properties_not_sortable.py index d91166dd8..bf3d2e95f 100644 --- a/foundry/models/properties_not_sortable.py +++ b/foundry/models/properties_not_sortable.py @@ -38,29 +38,28 @@ from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters from typing_extensions import Self + class PropertiesNotSortable(BaseModel): """ - Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. - """ # noqa: E501 + Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_api_name_not_found.py b/foundry/models/property_api_name_not_found.py index 57c3ac583..f909e279d 100644 --- a/foundry/models/property_api_name_not_found.py +++ b/foundry/models/property_api_name_not_found.py @@ -38,29 +38,28 @@ from foundry.models.property_api_name_not_found_parameters import PropertyApiNameNotFoundParameters from typing_extensions import Self + class PropertyApiNameNotFound(BaseModel): """ - A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. - """ # noqa: E501 + A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertyApiNameNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_api_name_not_found_parameters.py b/foundry/models/property_api_name_not_found_parameters.py index 98d0b0546..9f11163cc 100644 --- a/foundry/models/property_api_name_not_found_parameters.py +++ b/foundry/models/property_api_name_not_found_parameters.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class PropertyApiNameNotFoundParameters(BaseModel): """ PropertyApiNameNotFoundParameters - """ # noqa: E501 - property_base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="propertyBaseType") - property_id: StrictStr = Field(description="The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. ", alias="propertyId") + """ # noqa: E501 + + property_base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="propertyBaseType", + ) + property_id: StrictStr = Field( + description="The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. ", + alias="propertyId", + ) __properties: ClassVar[Set[str]] = set(("propertyBaseType", "propertyId")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_base_type_not_supported.py b/foundry/models/property_base_type_not_supported.py index 9be6bfd09..59015c498 100644 --- a/foundry/models/property_base_type_not_supported.py +++ b/foundry/models/property_base_type_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import InvalidAggregationRangePropertyTypeParameters +from foundry.models.invalid_aggregation_range_property_type_parameters import ( + InvalidAggregationRangePropertyTypeParameters, +) from typing_extensions import Self + class PropertyBaseTypeNotSupported(BaseModel): """ - The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 + The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_filters_not_supported.py b/foundry/models/property_filters_not_supported.py index 69ebdcb97..de23da27e 100644 --- a/foundry/models/property_filters_not_supported.py +++ b/foundry/models/property_filters_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import InvalidPropertyFiltersCombinationParameters +from foundry.models.invalid_property_filters_combination_parameters import ( + InvalidPropertyFiltersCombinationParameters, +) from typing_extensions import Self + class PropertyFiltersNotSupported(BaseModel): """ - At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. - """ # noqa: E501 + At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_types_search_not_supported.py b/foundry/models/property_types_search_not_supported.py index a43085e20..7a56a7e68 100644 --- a/foundry/models/property_types_search_not_supported.py +++ b/foundry/models/property_types_search_not_supported.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.property_types_search_not_supported_parameters import PropertyTypesSearchNotSupportedParameters +from foundry.models.property_types_search_not_supported_parameters import ( + PropertyTypesSearchNotSupportedParameters, +) from typing_extensions import Self + class PropertyTypesSearchNotSupported(BaseModel): """ - The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. - """ # noqa: E501 + The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: PropertyTypesSearchNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_types_search_not_supported_parameters.py b/foundry/models/property_types_search_not_supported_parameters.py index 16b039618..23191aabc 100644 --- a/foundry/models/property_types_search_not_supported_parameters.py +++ b/foundry/models/property_types_search_not_supported_parameters.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class PropertyTypesSearchNotSupportedParameters(BaseModel): """ PropertyTypesSearchNotSupportedParameters - """ # noqa: E501 + """ # noqa: E501 + parameters: Optional[Dict[str, List[StrictStr]]] = None __properties: ClassVar[Set[str]] = set(("parameters")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_v2.py b/foundry/models/property_v2.py index 2a518bf0f..5342f2ec6 100644 --- a/foundry/models/property_v2.py +++ b/foundry/models/property_v2.py @@ -38,21 +38,20 @@ from foundry.models.object_property_type import ObjectPropertyType from typing_extensions import Self + class PropertyV2(BaseModel): """ Details about some property of an object. - """ # noqa: E501 + """ # noqa: E501 + data_type: ObjectPropertyType = Field(alias="dataType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) __properties: ClassVar[Set[str]] = set(("dataType", "description", "displayName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +79,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -98,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/put_schema_permission_denied.py b/foundry/models/put_schema_permission_denied.py index 3c8714387..9a0a9610e 100644 --- a/foundry/models/put_schema_permission_denied.py +++ b/foundry/models/put_schema_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters from typing_extensions import Self + class PutSchemaPermissionDenied(BaseModel): """ todo - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_aggregation_key_type.py b/foundry/models/query_aggregation_key_type.py index 03d8cff53..03c0ac36c 100644 --- a/foundry/models/query_aggregation_key_type.py +++ b/foundry/models/query_aggregation_key_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -48,13 +49,21 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation keys. """ -QueryAggregationKeyType = Annotated[Union[BooleanType, DateType, DoubleType, IntegerType, QueryAggregationRangeType, StringType, TimestampType], Field(discriminator="type")] - - +QueryAggregationKeyType = Annotated[ + Union[ + BooleanType, + DateType, + DoubleType, + IntegerType, + QueryAggregationRangeType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_aggregation_range_sub_type.py b/foundry/models/query_aggregation_range_sub_type.py index 16c0246ba..63731e76d 100644 --- a/foundry/models/query_aggregation_range_sub_type.py +++ b/foundry/models/query_aggregation_range_sub_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -45,16 +46,17 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation ranges. """ -QueryAggregationRangeSubType = Annotated[Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type")] - - +QueryAggregationRangeSubType = Annotated[ + Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type") +] # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__(QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType)) +object.__setattr__( + QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType) +) diff --git a/foundry/models/query_aggregation_range_type.py b/foundry/models/query_aggregation_range_type.py index 1ae4bb2cb..2e5368370 100644 --- a/foundry/models/query_aggregation_range_type.py +++ b/foundry/models/query_aggregation_range_type.py @@ -38,20 +38,17 @@ from foundry.models.query_aggregation_range_sub_type import QueryAggregationRangeSubType from typing_extensions import Self + class QueryAggregationRangeType(BaseModel): """ QueryAggregationRangeType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryAggregationRangeSubType = Field(alias="subType") type: Literal["range"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_aggregation_value_type.py b/foundry/models/query_aggregation_value_type.py index a76310413..c0b2cf5fa 100644 --- a/foundry/models/query_aggregation_value_type.py +++ b/foundry/models/query_aggregation_value_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -44,16 +45,17 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation keys. """ -QueryAggregationValueType = Annotated[Union[DateType, DoubleType, TimestampType], Field(discriminator="type")] - - +QueryAggregationValueType = Annotated[ + Union[DateType, DoubleType, TimestampType], Field(discriminator="type") +] # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__(QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType)) +object.__setattr__( + QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType) +) diff --git a/foundry/models/query_data_type.py b/foundry/models/query_data_type.py index 059e3a873..d1e4c442d 100644 --- a/foundry/models/query_data_type.py +++ b/foundry/models/query_data_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -62,17 +63,13 @@ class QueryUnionType(BaseModel): """ QueryUnionType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["union"] union_types: Optional[List[QueryDataType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -100,8 +97,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -110,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict['unionTypes'] = _items + _dict["unionTypes"] = _items return _dict @classmethod @@ -122,31 +118,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryUnionType.model_rebuild(raise_errors=False) + class QueryStructField(BaseModel): """ QueryStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: QueryDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -174,13 +168,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -192,31 +185,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryStructField.model_rebuild(raise_errors=False) + class QueryStructType(BaseModel): """ QueryStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[QueryStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -244,8 +235,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -254,7 +244,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -266,31 +256,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryStructType.model_rebuild(raise_errors=False) + class QuerySetType(BaseModel): """ QuerySetType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryDataType = Field(alias="subType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -318,13 +306,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -336,31 +323,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QuerySetType.model_rebuild(raise_errors=False) + class QueryArrayType(BaseModel): """ QueryArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryDataType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -388,13 +373,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -406,14 +390,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryArrayType.model_rebuild(raise_errors=False) @@ -421,9 +406,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Query parameters or outputs. """ -QueryDataType = Annotated[Union[AttachmentType, BooleanType, DateType, DoubleType, FloatType, IntegerType, LongType, NullType, OntologyObjectSetType, OntologyObjectType, QueryArrayType, QuerySetType, QueryStructType, QueryUnionType, StringType, ThreeDimensionalAggregation, TimestampType, TwoDimensionalAggregation, UnsupportedType], Field(discriminator="type")] - - +QueryDataType = Annotated[ + Union[ + AttachmentType, + BooleanType, + DateType, + DoubleType, + FloatType, + IntegerType, + LongType, + NullType, + OntologyObjectSetType, + OntologyObjectType, + QueryArrayType, + QuerySetType, + QueryStructType, + QueryUnionType, + StringType, + ThreeDimensionalAggregation, + TimestampType, + TwoDimensionalAggregation, + UnsupportedType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_encountered_user_facing_error.py b/foundry/models/query_encountered_user_facing_error.py index 54eea50d5..2d76bdabc 100644 --- a/foundry/models/query_encountered_user_facing_error.py +++ b/foundry/models/query_encountered_user_facing_error.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import FunctionEncounteredUserFacingErrorParameters +from foundry.models.function_encountered_user_facing_error_parameters import ( + FunctionEncounteredUserFacingErrorParameters, +) from typing_extensions import Self + class QueryEncounteredUserFacingError(BaseModel): """ - The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 + The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_memory_exceeded_limit.py b/foundry/models/query_memory_exceeded_limit.py index bba95ed34..bc7ad8566 100644 --- a/foundry/models/query_memory_exceeded_limit.py +++ b/foundry/models/query_memory_exceeded_limit.py @@ -38,29 +38,28 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self + class QueryMemoryExceededLimit(BaseModel): """ - Memory limits were exceeded for the `Query` execution. - """ # noqa: E501 + Memory limits were exceeded for the `Query` execution. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('TIMEOUT'): + if value not in ("TIMEOUT"): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_not_found.py b/foundry/models/query_not_found.py index 501f93710..9475af5cc 100644 --- a/foundry/models/query_not_found.py +++ b/foundry/models/query_not_found.py @@ -38,29 +38,28 @@ from foundry.models.query_not_found_parameters import QueryNotFoundParameters from typing_extensions import Self + class QueryNotFound(BaseModel): """ The query is not found, or the user does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: QueryNotFoundParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_not_found_parameters.py b/foundry/models/query_not_found_parameters.py index a051ae929..667e32a8f 100644 --- a/foundry/models/query_not_found_parameters.py +++ b/foundry/models/query_not_found_parameters.py @@ -37,19 +37,16 @@ from pydantic import Field from typing_extensions import Self + class QueryNotFoundParameters(BaseModel): """ QueryNotFoundParameters - """ # noqa: E501 + """ # noqa: E501 + query: StrictStr = Field(description="The name of the Query in the API. ") __properties: ClassVar[Set[str]] = set(("query")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -92,12 +88,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_parameter_v2.py b/foundry/models/query_parameter_v2.py index a9fd86e52..36c71ac98 100644 --- a/foundry/models/query_parameter_v2.py +++ b/foundry/models/query_parameter_v2.py @@ -38,20 +38,17 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self + class QueryParameterV2(BaseModel): """ Details about a parameter of a query. - """ # noqa: E501 + """ # noqa: E501 + data_type: QueryDataType = Field(alias="dataType") description: Optional[StrictStr] = None __properties: ClassVar[Set[str]] = set(("dataType", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_time_exceeded_limit.py b/foundry/models/query_time_exceeded_limit.py index 22d79a8b1..a7f0e42ad 100644 --- a/foundry/models/query_time_exceeded_limit.py +++ b/foundry/models/query_time_exceeded_limit.py @@ -38,29 +38,28 @@ from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters from typing_extensions import Self + class QueryTimeExceededLimit(BaseModel): """ - Time limits were exceeded for the `Query` execution. - """ # noqa: E501 + Time limits were exceeded for the `Query` execution. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('TIMEOUT'): + if value not in ("TIMEOUT"): raise ValueError("must be one of enum values ('TIMEOUT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_type.py b/foundry/models/query_type.py index d4349dede..c37e3f354 100644 --- a/foundry/models/query_type.py +++ b/foundry/models/query_type.py @@ -39,25 +39,30 @@ from foundry.models.parameter import Parameter from typing_extensions import Self + class QueryType(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) output: Optional[OntologyDataType] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") - version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " + ) + version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " + ) + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "output", "parameters", "rid", "version") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,20 +90,19 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict['output'] = self.output.to_dict() + _dict["output"] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -110,12 +114,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_type_v2.py b/foundry/models/query_type_v2.py index 10e2ed1c0..02d8ef095 100644 --- a/foundry/models/query_type_v2.py +++ b/foundry/models/query_type_v2.py @@ -39,25 +39,30 @@ from foundry.models.query_parameter_v2 import QueryParameterV2 from typing_extensions import Self + class QueryTypeV2(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) output: QueryDataType parameters: Optional[Dict[str, QueryParameterV2]] = None - rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") - version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " + ) + version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " + ) + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "output", "parameters", "rid", "version") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,20 +90,19 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict['output'] = self.output.to_dict() + _dict["output"] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -110,12 +114,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/read_table_permission_denied.py b/foundry/models/read_table_permission_denied.py index c4b012303..1dcd3a70e 100644 --- a/foundry/models/read_table_permission_denied.py +++ b/foundry/models/read_table_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters from typing_extensions import Self + class ReadTablePermissionDenied(BaseModel): """ The provided token does not have permission to read the given dataset as a table. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/release_status.py b/foundry/models/release_status.py index 1df522dfb..a1a993020 100644 --- a/foundry/models/release_status.py +++ b/foundry/models/release_status.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,13 +47,11 @@ class ReleaseStatus(str, Enum): """ allowed enum values """ - ACTIVE = 'ACTIVE' - EXPERIMENTAL = 'EXPERIMENTAL' - DEPRECATED = 'DEPRECATED' + ACTIVE = "ACTIVE" + EXPERIMENTAL = "EXPERIMENTAL" + DEPRECATED = "DEPRECATED" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReleaseStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/resource_name_already_exists.py b/foundry/models/resource_name_already_exists.py index c5b791966..f2675eeb0 100644 --- a/foundry/models/resource_name_already_exists.py +++ b/foundry/models/resource_name_already_exists.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.resource_name_already_exists_parameters import ResourceNameAlreadyExistsParameters +from foundry.models.resource_name_already_exists_parameters import ( + ResourceNameAlreadyExistsParameters, +) from typing_extensions import Self + class ResourceNameAlreadyExists(BaseModel): """ The provided resource name is already in use by another resource in the same folder. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ResourceNameAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('CONFLICT'): + if value not in ("CONFLICT"): raise ValueError("must be one of enum values ('CONFLICT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/resource_name_already_exists_parameters.py b/foundry/models/resource_name_already_exists_parameters.py index 6cb3d7d61..8ac8371d8 100644 --- a/foundry/models/resource_name_already_exists_parameters.py +++ b/foundry/models/resource_name_already_exists_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class ResourceNameAlreadyExistsParameters(BaseModel): """ ResourceNameAlreadyExistsParameters - """ # noqa: E501 + """ # noqa: E501 + parent_folder_rid: StrictStr = Field(alias="parentFolderRid") resource_name: StrictStr = Field(alias="resourceName") __properties: ClassVar[Set[str]] = set(("parentFolderRid", "resourceName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/return_edits_mode.py b/foundry/models/return_edits_mode.py index 38b9498f4..78d2adb57 100644 --- a/foundry/models/return_edits_mode.py +++ b/foundry/models/return_edits_mode.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,12 +47,10 @@ class ReturnEditsMode(str, Enum): """ allowed enum values """ - ALL = 'ALL' - NONE = 'NONE' + ALL = "ALL" + NONE = "NONE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReturnEditsMode from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/schema_not_found.py b/foundry/models/schema_not_found.py index 2efd614e6..6b88749a3 100644 --- a/foundry/models/schema_not_found.py +++ b/foundry/models/schema_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import DeleteSchemaPermissionDeniedParameters +from foundry.models.delete_schema_permission_denied_parameters import ( + DeleteSchemaPermissionDeniedParameters, +) from typing_extensions import Self + class SchemaNotFound(BaseModel): """ A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/short_type.py b/foundry/models/short_type.py index 22263bac3..a4b8f7d6e 100644 --- a/foundry/models/short_type.py +++ b/foundry/models/short_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class ShortType(BaseModel): """ ShortType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["short"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/string_type.py b/foundry/models/string_type.py index 97732ad2f..4a53d17d2 100644 --- a/foundry/models/string_type.py +++ b/foundry/models/string_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class StringType(BaseModel): """ StringType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["string"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/table_export_format.py b/foundry/models/table_export_format.py index f47ff578b..75e6f213d 100644 --- a/foundry/models/table_export_format.py +++ b/foundry/models/table_export_format.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,18 +41,16 @@ class TableExportFormat(str, Enum): """ - Format for tabular dataset export. + Format for tabular dataset export. """ """ allowed enum values """ - ARROW = 'ARROW' - CSV = 'CSV' + ARROW = "ARROW" + CSV = "CSV" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TableExportFormat from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/three_dimensional_aggregation.py b/foundry/models/three_dimensional_aggregation.py index c688b1934..15966c667 100644 --- a/foundry/models/three_dimensional_aggregation.py +++ b/foundry/models/three_dimensional_aggregation.py @@ -39,21 +39,18 @@ from foundry.models.two_dimensional_aggregation import TwoDimensionalAggregation from typing_extensions import Self + class ThreeDimensionalAggregation(BaseModel): """ ThreeDimensionalAggregation - """ # noqa: E501 + """ # noqa: E501 + key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["threeDimensionalAggregation"] value_type: TwoDimensionalAggregation = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,16 +78,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -102,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/time_series_item_type.py b/foundry/models/time_series_item_type.py index ea15062ad..770ed56bb 100644 --- a/foundry/models/time_series_item_type.py +++ b/foundry/models/time_series_item_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -43,15 +44,12 @@ from foundry.models.string_type import StringType - """ A union of the types supported by time series properties. """ TimeSeriesItemType = Annotated[Union[DoubleType, StringType], Field(discriminator="type")] - - # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. diff --git a/foundry/models/timeseries_type.py b/foundry/models/timeseries_type.py index 415e94abd..64e0ce21e 100644 --- a/foundry/models/timeseries_type.py +++ b/foundry/models/timeseries_type.py @@ -38,20 +38,17 @@ from foundry.models.time_series_item_type import TimeSeriesItemType from typing_extensions import Self + class TimeseriesType(BaseModel): """ TimeseriesType - """ # noqa: E501 + """ # noqa: E501 + item_type: TimeSeriesItemType = Field(alias="itemType") type: Literal["timeseries"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/timestamp_type.py b/foundry/models/timestamp_type.py index dbfe8299c..e4ab4bb47 100644 --- a/foundry/models/timestamp_type.py +++ b/foundry/models/timestamp_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class TimestampType(BaseModel): """ TimestampType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["timestamp"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction.py b/foundry/models/transaction.py index 60f3ccd3b..b66b14361 100644 --- a/foundry/models/transaction.py +++ b/foundry/models/transaction.py @@ -39,23 +39,31 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self + class Transaction(BaseModel): """ - An operation that modifies the files within a dataset. - """ # noqa: E501 - closed_time: Optional[datetime] = Field(default=None, description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", alias="closedTime") - created_time: datetime = Field(description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", alias="createdTime") - rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ") + An operation that modifies the files within a dataset. + """ # noqa: E501 + + closed_time: Optional[datetime] = Field( + default=None, + description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", + alias="closedTime", + ) + created_time: datetime = Field( + description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", + alias="createdTime", + ) + rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. " + ) status: TransactionStatus transaction_type: TransactionType = Field(alias="transactionType") - __properties: ClassVar[Set[str]] = set(("closedTime", "createdTime", "rid", "status", "transactionType")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("closedTime", "createdTime", "rid", "status", "transactionType") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -98,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_not_committed.py b/foundry/models/transaction_not_committed.py index 1013c4a33..173635a72 100644 --- a/foundry/models/transaction_not_committed.py +++ b/foundry/models/transaction_not_committed.py @@ -38,29 +38,28 @@ from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters from typing_extensions import Self + class TransactionNotCommitted(BaseModel): """ The given transaction has not been committed. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_not_committed_parameters.py b/foundry/models/transaction_not_committed_parameters.py index a53c86b30..beaf630a3 100644 --- a/foundry/models/transaction_not_committed_parameters.py +++ b/foundry/models/transaction_not_committed_parameters.py @@ -38,21 +38,24 @@ from foundry.models.transaction_status import TransactionStatus from typing_extensions import Self + class TransactionNotCommittedParameters(BaseModel): """ TransactionNotCommittedParameters - """ # noqa: E501 - dataset_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", alias="datasetRid") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + dataset_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", + alias="datasetRid", + ) + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) transaction_status: TransactionStatus = Field(alias="transactionStatus") __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionStatus")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +83,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_not_found.py b/foundry/models/transaction_not_found.py index 4102d498a..9a5b03a38 100644 --- a/foundry/models/transaction_not_found.py +++ b/foundry/models/transaction_not_found.py @@ -35,32 +35,33 @@ from typing import Set from pydantic import BaseModel, StrictStr, field_validator from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import AbortTransactionPermissionDeniedParameters +from foundry.models.abort_transaction_permission_denied_parameters import ( + AbortTransactionPermissionDeniedParameters, +) from typing_extensions import Self + class TransactionNotFound(BaseModel): """ The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('NOT_FOUND'): + if value not in ("NOT_FOUND"): raise ValueError("must be one of enum values ('NOT_FOUND')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +89,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +106,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_not_open.py b/foundry/models/transaction_not_open.py index a8bcff413..871afd83e 100644 --- a/foundry/models/transaction_not_open.py +++ b/foundry/models/transaction_not_open.py @@ -38,29 +38,28 @@ from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters from typing_extensions import Self + class TransactionNotOpen(BaseModel): """ The given transaction is not open. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_status.py b/foundry/models/transaction_status.py index feb53c84e..c8790b6e3 100644 --- a/foundry/models/transaction_status.py +++ b/foundry/models/transaction_status.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,19 +41,17 @@ class TransactionStatus(str, Enum): """ - The status of a Transaction. + The status of a Transaction. """ """ allowed enum values """ - ABORTED = 'ABORTED' - COMMITTED = 'COMMITTED' - OPEN = 'OPEN' + ABORTED = "ABORTED" + COMMITTED = "COMMITTED" + OPEN = "OPEN" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/transaction_type.py b/foundry/models/transaction_type.py index 26b0bb8e9..4bedfadc0 100644 --- a/foundry/models/transaction_type.py +++ b/foundry/models/transaction_type.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,20 +41,18 @@ class TransactionType(str, Enum): """ - The type of a Transaction. + The type of a Transaction. """ """ allowed enum values """ - APPEND = 'APPEND' - UPDATE = 'UPDATE' - SNAPSHOT = 'SNAPSHOT' - DELETE = 'DELETE' + APPEND = "APPEND" + UPDATE = "UPDATE" + SNAPSHOT = "SNAPSHOT" + DELETE = "DELETE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/two_dimensional_aggregation.py b/foundry/models/two_dimensional_aggregation.py index aca1dd877..3d7e8328c 100644 --- a/foundry/models/two_dimensional_aggregation.py +++ b/foundry/models/two_dimensional_aggregation.py @@ -39,21 +39,18 @@ from foundry.models.query_aggregation_value_type import QueryAggregationValueType from typing_extensions import Self + class TwoDimensionalAggregation(BaseModel): """ TwoDimensionalAggregation - """ # noqa: E501 + """ # noqa: E501 + key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["twoDimensionalAggregation"] value_type: QueryAggregationValueType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,16 +78,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -102,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unknown_distance_unit.py b/foundry/models/unknown_distance_unit.py index 7c88348b6..3f280663a 100644 --- a/foundry/models/unknown_distance_unit.py +++ b/foundry/models/unknown_distance_unit.py @@ -38,29 +38,28 @@ from foundry.models.unknown_distance_unit_parameters import UnknownDistanceUnitParameters from typing_extensions import Self + class UnknownDistanceUnit(BaseModel): """ An unknown distance unit was provided. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: UnknownDistanceUnitParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unknown_distance_unit_parameters.py b/foundry/models/unknown_distance_unit_parameters.py index 712f74fea..8347af357 100644 --- a/foundry/models/unknown_distance_unit_parameters.py +++ b/foundry/models/unknown_distance_unit_parameters.py @@ -38,20 +38,17 @@ from foundry.models.distance_unit import DistanceUnit from typing_extensions import Self + class UnknownDistanceUnitParameters(BaseModel): """ UnknownDistanceUnitParameters - """ # noqa: E501 + """ # noqa: E501 + known_units: Optional[List[DistanceUnit]] = Field(default=None, alias="knownUnits") unknown_unit: StrictStr = Field(alias="unknownUnit") __properties: ClassVar[Set[str]] = set(("knownUnits", "unknownUnit")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +76,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +90,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unknown_parameter.py b/foundry/models/unknown_parameter.py index 06e64d67c..896659443 100644 --- a/foundry/models/unknown_parameter.py +++ b/foundry/models/unknown_parameter.py @@ -38,29 +38,28 @@ from foundry.models.unknown_parameter_parameters import UnknownParameterParameters from typing_extensions import Self + class UnknownParameter(BaseModel): """ - The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. - """ # noqa: E501 + The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: UnknownParameterParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unknown_parameter_parameters.py b/foundry/models/unknown_parameter_parameters.py index e8af08609..a0a0a0c6a 100644 --- a/foundry/models/unknown_parameter_parameters.py +++ b/foundry/models/unknown_parameter_parameters.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class UnknownParameterParameters(BaseModel): """ UnknownParameterParameters - """ # noqa: E501 + """ # noqa: E501 + expected_parameters: Optional[List[StrictStr]] = Field(default=None, alias="expectedParameters") unknown_parameters: Optional[List[StrictStr]] = Field(default=None, alias="unknownParameters") __properties: ClassVar[Set[str]] = set(("expectedParameters", "unknownParameters")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unsupported_object_set.py b/foundry/models/unsupported_object_set.py index b276fef54..e10612026 100644 --- a/foundry/models/unsupported_object_set.py +++ b/foundry/models/unsupported_object_set.py @@ -37,29 +37,28 @@ from pydantic import Field from typing_extensions import Self + class UnsupportedObjectSet(BaseModel): """ The requested object set is not supported. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('INVALID_ARGUMENT'): + if value not in ("INVALID_ARGUMENT"): raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +86,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -102,12 +100,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unsupported_type.py b/foundry/models/unsupported_type.py index 770c3217d..c816a5ae6 100644 --- a/foundry/models/unsupported_type.py +++ b/foundry/models/unsupported_type.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class UnsupportedType(BaseModel): """ UnsupportedType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["unsupported"] unsupported_type: Literal["unsupported"] = Field(alias="unsupportedType") __properties: ClassVar[Set[str]] = set(("type", "unsupportedType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/upload_file_permission_denied.py b/foundry/models/upload_file_permission_denied.py index cd9e18454..7a04bcd70 100644 --- a/foundry/models/upload_file_permission_denied.py +++ b/foundry/models/upload_file_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters from typing_extensions import Self + class UploadFilePermissionDenied(BaseModel): """ The provided token does not have permission to upload the given file to the given dataset and transaction. - """ # noqa: E501 + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/view_object_permission_denied.py b/foundry/models/view_object_permission_denied.py index 8ec8eb703..240d921c9 100644 --- a/foundry/models/view_object_permission_denied.py +++ b/foundry/models/view_object_permission_denied.py @@ -38,29 +38,28 @@ from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from typing_extensions import Self + class ViewObjectPermissionDenied(BaseModel): """ - The user does not have permission to view objects of this `ObjectType`. - """ # noqa: E501 + The user does not have permission to view objects of this `ObjectType`. + """ # noqa: E501 + error_code: StrictStr = Field(alias="errorCode") error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") error_name: StrictStr = Field(alias="errorName") parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set(("errorCode", "errorInstanceId", "errorName", "parameters")) + __properties: ClassVar[Set[str]] = set( + ("errorCode", "errorInstanceId", "errorName", "parameters") + ) - @field_validator('error_code') + @field_validator("error_code") def error_code_validate_enum(cls, value): """Validates the enum""" - if value not in ('PERMISSION_DENIED'): + if value not in ("PERMISSION_DENIED"): raise ValueError("must be one of enum values ('PERMISSION_DENIED')") return value - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,13 +87,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of parameters if self.parameters: - _dict['parameters'] = self.parameters.to_dict() + _dict["parameters"] = self.parameters.to_dict() return _dict @classmethod @@ -106,12 +104,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/rest.py b/foundry/rest.py index 61816ff7e..a9c664497 100644 --- a/foundry/rest.py +++ b/foundry/rest.py @@ -52,7 +52,6 @@ def data(self) -> bytes: class RESTResponse(io.IOBase): - def __init__(self, resp: Urllib3Response) -> None: self.response = resp self.status = resp.status @@ -74,7 +73,6 @@ def getheader(self, name, default=None): class RESTClientObject: - def __init__(self, configuration: Configuration) -> None: # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -90,21 +88,12 @@ def __init__(self, configuration: Configuration) -> None: addition_pool_args = {} if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + addition_pool_args["retries"] = configuration.retries - self.pool_manager = urllib3.PoolManager( - cert_reqs=cert_reqs, - **addition_pool_args - ) + self.pool_manager = urllib3.PoolManager(cert_reqs=cert_reqs, **addition_pool_args) def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None + self, method, url, headers=None, body=None, post_params=None, _request_timeout=None ): """Perform requests. @@ -121,20 +110,10 @@ def request( (connection, read) timeouts. """ method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] + assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) + raise ApiValueError("body parameter cannot be used with post_params parameter.") post_params = post_params or {} headers = headers or {} @@ -143,25 +122,15 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) + elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: + timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) try: # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - + if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: # no content type provided or payload is json - content_type = headers.get('Content-Type') - if ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ): + content_type = headers.get("Content-Type") + if not content_type or re.search("json", content_type, re.IGNORECASE): request_body = None if body is not None: request_body = json.dumps(body) @@ -171,9 +140,9 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'application/x-www-form-urlencoded': + elif content_type == "application/x-www-form-urlencoded": r = self.pool_manager.request( method, url, @@ -181,13 +150,13 @@ def request( encode_multipart=False, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) - elif content_type == 'multipart/form-data': + elif content_type == "multipart/form-data": # must del headers['Content-Type'], or the correct # Content-Type which generated by urllib3 will be # overwritten. - del headers['Content-Type'] + del headers["Content-Type"] r = self.pool_manager.request( method, url, @@ -195,7 +164,7 @@ def request( encode_multipart=True, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) # Pass a `string` parameter directly in the body to support # other content types than Json when `body` argument is @@ -208,7 +177,7 @@ def request( body=request_body, timeout=timeout, headers=headers, - preload_content=False + preload_content=False, ) else: # Cannot generate the request from given parameters @@ -219,12 +188,7 @@ def request( # For `GET`, `HEAD` else: r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False + method, url, fields={}, timeout=timeout, headers=headers, preload_content=False ) except urllib3.exceptions.SSLError as e: msg = "\n".join([type(e).__name__, str(e)]) diff --git a/test/__init__.py b/test/__init__.py index 2b4e3a13f..490e9ab88 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -11,4 +11,3 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - diff --git a/test/api/test_datasets_api_service_api.py b/test/api/test_datasets_api_service_api.py index ebf64b51c..40859dff6 100644 --- a/test/api/test_datasets_api_service_api.py +++ b/test/api/test_datasets_api_service_api.py @@ -158,7 +158,5 @@ def test_read_table_can_pass_in_str(client: FoundryClient, monkeypatch): def test_read_table_can_pass_enum(client: FoundryClient, monkeypatch): mock_data_read(monkeypatch, data=b"hello") - res = client.datasets.read_table( - format=TableExportFormat.CSV, dataset_rid="test.rid" - ) + res = client.datasets.read_table(format=TableExportFormat.CSV, dataset_rid="test.rid") assert res == b"hello" diff --git a/test/models/test_create_dataset_request.py b/test/models/test_create_dataset_request.py index 19bbe2168..3a9cfb12b 100644 --- a/test/models/test_create_dataset_request.py +++ b/test/models/test_create_dataset_request.py @@ -39,9 +39,7 @@ def test_to_dict(): def test_from_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest.from_dict( - {"name": "FOLDER_NAME", "parentFolderRid": 123} - ), + lambda: CreateDatasetRequest.from_dict({"name": "FOLDER_NAME", "parentFolderRid": 123}), ) @@ -55,7 +53,5 @@ def test_from_fails_missing(): def test_init_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest( - name="FOLDER_NAME", parentFolderRid=123 # type: ignore - ), + lambda: CreateDatasetRequest(name="FOLDER_NAME", parentFolderRid=123), # type: ignore ) From fc66d64a290a8801eea220bcaa40a64199ffd016 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:36:52 -0400 Subject: [PATCH 05/22] refactor --- README.md | 212 +- docs/AbortTransactionPermissionDenied.md | 32 - ...rtTransactionPermissionDeniedParameters.md | 28 - docs/ActionContainsDuplicateEdits.md | 32 - docs/ActionEditedPropertiesNotFound.md | 32 - docs/ActionNotFound.md | 32 - docs/ActionNotFoundParameters.md | 27 - docs/ActionParameterObjectNotFound.md | 32 - ...ActionParameterObjectNotFoundParameters.md | 27 - docs/ActionParameterObjectTypeNotFound.md | 32 - docs/ActionTypeNotFound.md | 32 - docs/ActionTypeNotFoundParameters.md | 28 - docs/ActionValidationFailed.md | 32 - docs/ActionValidationFailedParameters.md | 27 - docs/AggregationGroupCountExceededLimit.md | 32 - ...gationGroupCountExceededLimitParameters.md | 28 - docs/ApiFeaturePreviewUsageOnly.md | 32 - docs/ApiUsageDenied.md | 32 - docs/ApplyActionFailed.md | 30 - docs/ApplyActionMode.md | 11 - docs/ApplyActionRequestOptions.md | 28 - docs/AsyncOperationError.md | 31 - docs/AttachmentNotFound.md | 32 - docs/AttachmentNotFoundParameters.md | 27 - docs/AttachmentSizeExceededLimit.md | 32 - docs/AttachmentSizeExceededLimitParameters.md | 28 - docs/BranchAlreadyExists.md | 32 - docs/BranchAlreadyExistsParameters.md | 28 - docs/BranchNotFound.md | 32 - docs/ColumnTypesNotSupported.md | 32 - docs/ColumnTypesNotSupportedParameters.md | 27 - docs/CommitTransactionPermissionDenied.md | 32 - docs/CompositePrimaryKeyNotSupported.md | 32 - ...mpositePrimaryKeyNotSupportedParameters.md | 28 - docs/CreateBranchPermissionDenied.md | 32 - docs/CreateDatasetPermissionDenied.md | 32 - ...CreateDatasetPermissionDeniedParameters.md | 28 - docs/CreateTransactionPermissionDenied.md | 32 - docs/DatasetNotFound.md | 32 - docs/DatasetsApiServiceApi.md | 48 +- docs/DeleteBranchPermissionDenied.md | 32 - docs/DeleteSchemaPermissionDenied.md | 32 - .../DeleteSchemaPermissionDeniedParameters.md | 29 - docs/DeploymentNotAvailable.md | 32 - docs/DeploymentNotAvailableParameters.md | 28 - docs/DeploymentNotFound.md | 32 - docs/DistanceUnit.md | 18 - docs/DuplicateOrderBy.md | 32 - docs/DuplicateOrderByParameters.md | 27 - docs/EditObjectPermissionDenied.md | 32 - docs/FileAlreadyExists.md | 32 - docs/FileAlreadyExistsParameters.md | 29 - docs/FileNotFoundOnBranch.md | 32 - docs/FileNotFoundOnBranchParameters.md | 29 - docs/FileNotFoundOnTransactionRange.md | 32 - ...ileNotFoundOnTransactionRangeParameters.md | 30 - docs/FolderNotFound.md | 32 - docs/FolderNotFoundParameters.md | 27 - docs/FunctionEncounteredUserFacingError.md | 32 - ...ionEncounteredUserFacingErrorParameters.md | 29 - docs/FunctionExecutionFailed.md | 30 - docs/FunctionExecutionFailedParameters.md | 28 - docs/FunctionExecutionTimedOut.md | 30 - docs/FunctionInvalidInput.md | 30 - docs/InvalidAggregationRange.md | 32 - docs/InvalidAggregationRangePropertyType.md | 32 - ...dAggregationRangePropertyTypeParameters.md | 29 - docs/InvalidAggregationRangeValue.md | 32 - docs/InvalidApplyActionOptionCombination.md | 32 - ...dApplyActionOptionCombinationParameters.md | 27 - docs/InvalidBranchId.md | 32 - docs/InvalidBranchIdParameters.md | 27 - docs/InvalidContentLength.md | 32 - docs/InvalidContentType.md | 32 - docs/InvalidDurationGroupByPropertyType.md | 32 - docs/InvalidDurationGroupByValue.md | 32 - docs/InvalidFields.md | 32 - docs/InvalidFieldsParameters.md | 27 - docs/InvalidGroupId.md | 32 - docs/InvalidGroupIdParameters.md | 27 - docs/InvalidPageSize.md | 32 - docs/InvalidPageSizeParameters.md | 27 - docs/InvalidPageToken.md | 32 - docs/InvalidPageTokenParameters.md | 27 - docs/InvalidParameterCombination.md | 32 - docs/InvalidParameterCombinationParameters.md | 28 - docs/InvalidParameterValue.md | 32 - docs/InvalidParameterValueParameters.md | 30 - docs/InvalidPropertyFilterValue.md | 32 - docs/InvalidPropertyFilterValueParameters.md | 30 - docs/InvalidPropertyFiltersCombination.md | 32 - ...lidPropertyFiltersCombinationParameters.md | 28 - docs/InvalidPropertyType.md | 32 - docs/InvalidPropertyTypeParameters.md | 28 - docs/InvalidPropertyValue.md | 32 - docs/InvalidPropertyValueParameters.md | 29 - docs/InvalidQueryParameterValue.md | 32 - docs/InvalidQueryParameterValueParameters.md | 29 - docs/InvalidRangeQuery.md | 32 - docs/InvalidRangeQueryParameters.md | 31 - docs/InvalidSortOrder.md | 32 - docs/InvalidSortOrderParameters.md | 27 - docs/InvalidSortType.md | 32 - docs/InvalidSortTypeParameters.md | 27 - docs/InvalidTransactionType.md | 32 - docs/InvalidTransactionTypeParameters.md | 29 - docs/InvalidUserId.md | 32 - docs/InvalidUserIdParameters.md | 27 - docs/LanguageModelSource.md | 11 - docs/LanguageModelSourceNotSupported.md | 30 - ...nguageModelSourceNotSupportedParameters.md | 27 - docs/LinkAlreadyExists.md | 32 - docs/LinkTypeNotFound.md | 32 - docs/LinkTypeNotFoundParameters.md | 28 - docs/LinkedObjectNotFound.md | 32 - docs/LinkedObjectNotFoundParameters.md | 29 - docs/MalformedPropertyFilters.md | 32 - docs/MalformedPropertyFiltersParameters.md | 27 - docs/MarketplaceActionMappingNotFound.md | 32 - ...ketplaceActionMappingNotFoundParameters.md | 29 - docs/MarketplaceInstallationNotFound.md | 32 - ...rketplaceInstallationNotFoundParameters.md | 28 - docs/MarketplaceLinkMappingNotFound.md | 32 - ...arketplaceLinkMappingNotFoundParameters.md | 30 - docs/MarketplaceObjectMappingNotFound.md | 32 - ...ketplaceObjectMappingNotFoundParameters.md | 29 - docs/MarketplaceQueryMappingNotFound.md | 32 - ...rketplaceQueryMappingNotFoundParameters.md | 29 - docs/MissingParameter.md | 32 - docs/MissingParameterParameters.md | 27 - docs/MissingPostBody.md | 32 - docs/MultipleGroupByOnFieldNotSupported.md | 32 - ...pleGroupByOnFieldNotSupportedParameters.md | 27 - docs/MultiplePropertyValuesNotSupported.md | 32 - ...plePropertyValuesNotSupportedParameters.md | 28 - docs/ObjectAlreadyExists.md | 32 - docs/ObjectChanged.md | 32 - docs/ObjectNotFound.md | 32 - docs/ObjectNotFoundParameters.md | 28 - docs/ObjectTypeNotFound.md | 32 - docs/ObjectTypeNotFoundParameters.md | 28 - docs/ObjectTypeNotSynced.md | 32 - docs/ObjectTypeNotSyncedParameters.md | 27 - docs/ObjectsExceededLimit.md | 32 - docs/OntologiesApiServiceApi.md | 22 +- docs/OntologiesV2ApiServiceApi.md | 28 +- docs/OntologyEditsExceededLimit.md | 32 - docs/OntologyEditsExceededLimitParameters.md | 28 - docs/OntologyNotFound.md | 32 - docs/OntologyNotFoundParameters.md | 28 - docs/OntologySyncing.md | 32 - docs/OpenTransactionAlreadyExists.md | 32 - docs/OperationNotFound.md | 32 - docs/OperationNotFoundParameters.md | 27 - docs/ParameterObjectNotFound.md | 32 - docs/ParameterObjectNotFoundParameters.md | 28 - docs/ParameterObjectSetRidNotFound.md | 32 - ...ParameterObjectSetRidNotFoundParameters.md | 27 - docs/ParameterTypeNotSupported.md | 32 - docs/ParameterTypeNotSupportedParameters.md | 28 - docs/ParametersNotFound.md | 32 - docs/ParametersNotFoundParameters.md | 29 - docs/ParentAttachmentPermissionDenied.md | 32 - docs/PropertiesNotFilterable.md | 32 - docs/PropertiesNotFound.md | 32 - docs/PropertiesNotFoundParameters.md | 28 - docs/PropertiesNotSearchable.md | 32 - docs/PropertiesNotSearchableParameters.md | 27 - docs/PropertiesNotSortable.md | 32 - docs/PropertyApiNameNotFound.md | 32 - docs/PropertyApiNameNotFoundParameters.md | 28 - docs/PropertyBaseTypeNotSupported.md | 32 - docs/PropertyFiltersNotSupported.md | 32 - docs/PropertyTypesSearchNotSupported.md | 32 - ...opertyTypesSearchNotSupportedParameters.md | 27 - docs/PutSchemaPermissionDenied.md | 32 - docs/QueryEncounteredUserFacingError.md | 32 - docs/QueryMemoryExceededLimit.md | 32 - docs/QueryNotFound.md | 32 - docs/QueryNotFoundParameters.md | 27 - docs/QueryTimeExceededLimit.md | 32 - docs/ReadTablePermissionDenied.md | 32 - docs/ResourceNameAlreadyExists.md | 32 - docs/ResourceNameAlreadyExistsParameters.md | 28 - docs/ReturnEditsMode.md | 11 - docs/SchemaNotFound.md | 32 - docs/TransactionNotCommitted.md | 32 - docs/TransactionNotCommittedParameters.md | 29 - docs/TransactionNotFound.md | 32 - docs/TransactionNotOpen.md | 32 - docs/UnknownDistanceUnit.md | 32 - docs/UnknownDistanceUnitParameters.md | 28 - docs/UnknownParameter.md | 32 - docs/UnknownParameterParameters.md | 28 - docs/UnsupportedObjectSet.md | 32 - docs/UploadFilePermissionDenied.md | 32 - docs/ViewObjectPermissionDenied.md | 32 - foundry/__init__.py | 41 +- foundry/_core/__init__.py | 14 + .../_auth_utils.py => _core/auth_utils.py} | 11 +- foundry/_core/confidential_client_auth.py | 119 + foundry/_core/foundry_token_auth_client.py | 51 + foundry/{auth => _core}/oauth.py | 1 - foundry/_core/oauth_utils.py | 279 ++ foundry/_core/palantir_session.py | 141 + foundry/_core/public_client_auth.py | 147 + foundry/_errors/environment_not_configured.py | 16 + foundry/_errors/helpers.py | 23 + foundry/_errors/not_authenticated.py | 16 + foundry/_errors/palantir_rpc_exception.py | 23 + foundry/_errors/sdk_internal_error.py | 73 + foundry/{versions.py => _versions.py} | 6 + foundry/api/__init__.py | 1 + foundry/api/datasets_api_service_api.py | 1381 +++---- foundry/api/ontologies_api_service_api.py | 675 ++-- foundry/api/ontologies_v2_api_service_api.py | 839 ++-- foundry/api_client.py | 180 +- foundry/api_response.py | 34 - foundry/auth/_oauth_utils.py | 167 - foundry/auth/foundry_auth_token_client.py | 88 - foundry/auth/foundry_oauth_client.py | 105 - foundry/configuration.py | 158 - foundry/exceptions.py | 225 -- foundry/foundry_client.py | 21 +- foundry/models/__init__.py | 257 -- .../abort_transaction_permission_denied.py | 115 - ...ransaction_permission_denied_parameters.py | 104 - .../models/action_contains_duplicate_edits.py | 109 - .../action_edited_properties_not_found.py | 109 - foundry/models/action_not_found.py | 113 - foundry/models/action_not_found_parameters.py | 99 - .../action_parameter_object_not_found.py | 115 - ...n_parameter_object_not_found_parameters.py | 100 - .../action_parameter_object_type_not_found.py | 115 - foundry/models/action_parameter_type.py | 42 +- foundry/models/action_parameter_v2.py | 24 +- foundry/models/action_type.py | 43 +- foundry/models/action_type_not_found.py | 113 - .../action_type_not_found_parameters.py | 105 - foundry/models/action_type_v2.py | 43 +- foundry/models/action_validation_failed.py | 113 - .../action_validation_failed_parameters.py | 100 - .../aggregation_group_count_exceeded_limit.py | 115 - ...n_group_count_exceeded_limit_parameters.py | 98 - foundry/models/any_type.py | 22 +- .../models/api_feature_preview_usage_only.py | 109 - foundry/models/api_usage_denied.py | 109 - foundry/models/apply_action_failed.py | 109 - foundry/models/apply_action_mode.py | 56 - .../models/apply_action_request_options.py | 100 - foundry/models/async_operation_error.py | 103 - foundry/models/attachment_not_found.py | 113 - .../models/attachment_not_found_parameters.py | 101 - .../models/attachment_size_exceeded_limit.py | 115 - ...tachment_size_exceeded_limit_parameters.py | 98 - foundry/models/attachment_type.py | 22 +- foundry/models/binary_type.py | 22 +- foundry/models/boolean_type.py | 22 +- foundry/models/branch.py | 34 +- foundry/models/branch_already_exists.py | 113 - .../branch_already_exists_parameters.py | 103 - foundry/models/branch_not_found.py | 113 - foundry/models/byte_type.py | 22 +- foundry/models/column_types_not_supported.py | 113 - .../column_types_not_supported_parameters.py | 100 - .../commit_transaction_permission_denied.py | 115 - .../composite_primary_key_not_supported.py | 115 - ...te_primary_key_not_supported_parameters.py | 101 - .../models/create_branch_permission_denied.py | 113 - foundry/models/create_branch_request.py | 32 +- .../create_dataset_permission_denied.py | 115 - ...te_dataset_permission_denied_parameters.py | 98 - foundry/models/create_dataset_request.py | 22 +- foundry/models/create_link_rule.py | 52 +- foundry/models/create_object_rule.py | 27 +- .../create_transaction_permission_denied.py | 113 - foundry/models/create_transaction_request.py | 22 +- foundry/models/dataset.py | 26 +- foundry/models/dataset_not_found.py | 113 - foundry/models/date_type.py | 22 +- foundry/models/decimal_type.py | 22 +- .../models/delete_branch_permission_denied.py | 113 - foundry/models/delete_link_rule.py | 52 +- foundry/models/delete_object_rule.py | 27 +- .../models/delete_schema_permission_denied.py | 115 - ...ete_schema_permission_denied_parameters.py | 108 - foundry/models/deployment_api.py | 24 +- foundry/models/deployment_listing.py | 29 +- foundry/models/deployment_metadata.py | 31 +- foundry/models/deployment_not_available.py | 113 - .../deployment_not_available_parameters.py | 98 - foundry/models/deployment_not_found.py | 113 - foundry/models/deployment_transform_api.py | 26 +- foundry/models/distance_unit.py | 63 - foundry/models/double_type.py | 22 +- foundry/models/duplicate_order_by.py | 113 - .../models/duplicate_order_by_parameters.py | 96 - .../models/edit_object_permission_denied.py | 109 - foundry/models/file.py | 31 +- foundry/models/file_already_exists.py | 113 - .../models/file_already_exists_parameters.py | 107 - foundry/models/file_not_found_on_branch.py | 113 - .../file_not_found_on_branch_parameters.py | 106 - .../file_not_found_on_transaction_range.py | 115 - ...t_found_on_transaction_range_parameters.py | 114 - foundry/models/float_type.py | 22 +- foundry/models/folder_not_found.py | 113 - foundry/models/folder_not_found_parameters.py | 97 - .../function_encountered_user_facing_error.py | 115 - ...ncountered_user_facing_error_parameters.py | 105 - foundry/models/function_execution_failed.py | 113 - .../function_execution_failed_parameters.py | 104 - .../models/function_execution_timed_out.py | 113 - foundry/models/function_invalid_input.py | 113 - foundry/models/geo_point.py | 33 +- foundry/models/geo_point_type.py | 22 +- foundry/models/geo_shape_type.py | 22 +- foundry/models/geometry.py | 39 +- foundry/models/integer_type.py | 22 +- foundry/models/invalid_aggregation_range.py | 109 - ...invalid_aggregation_range_property_type.py | 115 - ...regation_range_property_type_parameters.py | 108 - .../models/invalid_aggregation_range_value.py | 115 - ...invalid_apply_action_option_combination.py | 115 - ...ly_action_option_combination_parameters.py | 103 - foundry/models/invalid_branch_id.py | 113 - .../models/invalid_branch_id_parameters.py | 99 - foundry/models/invalid_content_length.py | 109 - foundry/models/invalid_content_type.py | 109 - ...invalid_duration_group_by_property_type.py | 115 - .../models/invalid_duration_group_by_value.py | 109 - foundry/models/invalid_fields.py | 113 - foundry/models/invalid_fields_parameters.py | 96 - foundry/models/invalid_group_id.py | 113 - foundry/models/invalid_group_id_parameters.py | 97 - foundry/models/invalid_page_size.py | 113 - .../models/invalid_page_size_parameters.py | 99 - foundry/models/invalid_page_token.py | 113 - .../models/invalid_page_token_parameters.py | 100 - .../models/invalid_parameter_combination.py | 115 - ...nvalid_parameter_combination_parameters.py | 100 - foundry/models/invalid_parameter_value.py | 113 - .../invalid_parameter_value_parameters.py | 122 - .../models/invalid_property_filter_value.py | 115 - ...nvalid_property_filter_value_parameters.py | 114 - .../invalid_property_filters_combination.py | 115 - ...property_filters_combination_parameters.py | 101 - foundry/models/invalid_property_type.py | 113 - .../invalid_property_type_parameters.py | 104 - foundry/models/invalid_property_value.py | 113 - .../invalid_property_value_parameters.py | 113 - .../models/invalid_query_parameter_value.py | 115 - ...nvalid_query_parameter_value_parameters.py | 115 - foundry/models/invalid_range_query.py | 113 - .../models/invalid_range_query_parameters.py | 121 - foundry/models/invalid_sort_order.py | 113 - .../models/invalid_sort_order_parameters.py | 97 - foundry/models/invalid_sort_type.py | 113 - .../models/invalid_sort_type_parameters.py | 97 - foundry/models/invalid_transaction_type.py | 113 - .../invalid_transaction_type_parameters.py | 106 - foundry/models/invalid_user_id.py | 113 - foundry/models/invalid_user_id_parameters.py | 97 - foundry/models/language_model_source.py | 56 - .../language_model_source_not_supported.py | 115 - ...e_model_source_not_supported_parameters.py | 97 - foundry/models/line_string.py | 37 +- foundry/models/link_already_exists.py | 109 - foundry/models/link_type_not_found.py | 113 - .../models/link_type_not_found_parameters.py | 104 - foundry/models/link_type_side.py | 53 +- foundry/models/link_type_side_cardinality.py | 7 +- foundry/models/link_type_side_v2.py | 53 +- foundry/models/linked_object_not_found.py | 113 - .../linked_object_not_found_parameters.py | 109 - foundry/models/list_action_types_response.py | 30 +- .../models/list_action_types_response_v2.py | 30 +- foundry/models/list_branches_response.py | 34 +- foundry/models/list_deployments_response.py | 24 +- foundry/models/list_files_response.py | 30 +- foundry/models/list_object_types_response.py | 34 +- .../models/list_object_types_v2_response.py | 34 +- foundry/models/list_ontologies_response.py | 28 +- foundry/models/list_ontologies_v2_response.py | 28 +- .../list_outgoing_link_types_response.py | 34 +- .../list_outgoing_link_types_response_v2.py | 34 +- foundry/models/list_query_types_response.py | 30 +- .../models/list_query_types_response_v2.py | 30 +- foundry/models/logic_rule.py | 9 +- foundry/models/long_type.py | 22 +- foundry/models/malformed_property_filters.py | 113 - .../malformed_property_filters_parameters.py | 97 - .../marketplace_action_mapping_not_found.py | 115 - ...ace_action_mapping_not_found_parameters.py | 102 - .../marketplace_installation_not_found.py | 115 - ...place_installation_not_found_parameters.py | 98 - .../marketplace_link_mapping_not_found.py | 115 - ...place_link_mapping_not_found_parameters.py | 108 - .../marketplace_object_mapping_not_found.py | 115 - ...ace_object_mapping_not_found_parameters.py | 102 - .../marketplace_query_mapping_not_found.py | 115 - ...lace_query_mapping_not_found_parameters.py | 101 - foundry/models/missing_parameter.py | 113 - .../models/missing_parameter_parameters.py | 96 - foundry/models/missing_post_body.py | 109 - foundry/models/model_api_data_type.py | 26 +- foundry/models/model_api_type.py | 137 +- foundry/models/model_property.py | 31 +- foundry/models/modify_object_rule.py | 27 +- foundry/models/multi_line_string.py | 40 +- foundry/models/multi_point.py | 31 +- foundry/models/multi_polygon.py | 42 +- ...ultiple_group_by_on_field_not_supported.py | 115 - ...up_by_on_field_not_supported_parameters.py | 97 - .../multiple_property_values_not_supported.py | 115 - ...roperty_values_not_supported_parameters.py | 104 - foundry/models/null_type.py | 22 +- foundry/models/object_already_exists.py | 109 - foundry/models/object_changed.py | 109 - foundry/models/object_not_found.py | 113 - foundry/models/object_not_found_parameters.py | 102 - foundry/models/object_property_type.py | 47 +- foundry/models/object_type.py | 64 +- foundry/models/object_type_not_found.py | 113 - .../object_type_not_found_parameters.py | 106 - foundry/models/object_type_not_synced.py | 113 - .../object_type_not_synced_parameters.py | 100 - foundry/models/object_type_v2.py | 63 +- foundry/models/object_type_visibility.py | 9 +- foundry/models/object_type_with_link.py | 26 +- foundry/models/objects_exceeded_limit.py | 109 - foundry/models/ontology.py | 30 +- foundry/models/ontology_data_type.py | 145 +- .../models/ontology_edits_exceeded_limit.py | 115 - ...ntology_edits_exceeded_limit_parameters.py | 98 - foundry/models/ontology_full_metadata.py | 30 +- foundry/models/ontology_not_found.py | 113 - .../models/ontology_not_found_parameters.py | 102 - foundry/models/ontology_object_set_type.py | 34 +- foundry/models/ontology_object_type.py | 32 +- foundry/models/ontology_syncing.py | 113 - foundry/models/ontology_v2.py | 30 +- .../models/open_transaction_already_exists.py | 113 - foundry/models/operation_not_found.py | 113 - .../models/operation_not_found_parameters.py | 96 - foundry/models/parameter.py | 29 +- foundry/models/parameter_object_not_found.py | 113 - .../parameter_object_not_found_parameters.py | 101 - .../parameter_object_set_rid_not_found.py | 115 - ...ter_object_set_rid_not_found_parameters.py | 97 - .../models/parameter_type_not_supported.py | 115 - ...parameter_type_not_supported_parameters.py | 104 - foundry/models/parameters_not_found.py | 113 - .../models/parameters_not_found_parameters.py | 108 - .../parent_attachment_permission_denied.py | 109 - foundry/models/polygon.py | 40 +- foundry/models/properties_not_filterable.py | 113 - foundry/models/properties_not_found.py | 113 - .../models/properties_not_found_parameters.py | 101 - foundry/models/properties_not_searchable.py | 113 - .../properties_not_searchable_parameters.py | 97 - foundry/models/properties_not_sortable.py | 113 - foundry/models/property_api_name_not_found.py | 113 - .../property_api_name_not_found_parameters.py | 104 - .../property_base_type_not_supported.py | 115 - .../models/property_filters_not_supported.py | 115 - .../property_types_search_not_supported.py | 115 - ...y_types_search_not_supported_parameters.py | 96 - foundry/models/property_v2.py | 28 +- .../models/put_schema_permission_denied.py | 113 - foundry/models/query_aggregation_key_type.py | 17 +- .../query_aggregation_range_sub_type.py | 12 +- .../models/query_aggregation_range_type.py | 24 +- .../models/query_aggregation_value_type.py | 12 +- foundry/models/query_data_type.py | 142 +- .../query_encountered_user_facing_error.py | 115 - foundry/models/query_memory_exceeded_limit.py | 113 - foundry/models/query_not_found.py | 113 - foundry/models/query_not_found_parameters.py | 97 - foundry/models/query_parameter_v2.py | 24 +- foundry/models/query_time_exceeded_limit.py | 113 - foundry/models/query_type.py | 44 +- foundry/models/query_type_v2.py | 44 +- .../models/read_table_permission_denied.py | 113 - foundry/models/release_status.py | 9 +- .../models/resource_name_already_exists.py | 115 - ...resource_name_already_exists_parameters.py | 98 - foundry/models/return_edits_mode.py | 56 - foundry/models/schema_not_found.py | 115 - foundry/models/short_type.py | 22 +- foundry/models/string_type.py | 22 +- foundry/models/table_export_format.py | 9 +- .../models/three_dimensional_aggregation.py | 26 +- foundry/models/time_series_item_type.py | 4 +- foundry/models/timeseries_type.py | 24 +- foundry/models/timestamp_type.py | 22 +- foundry/models/transaction.py | 43 +- foundry/models/transaction_not_committed.py | 113 - .../transaction_not_committed_parameters.py | 106 - foundry/models/transaction_not_found.py | 115 - foundry/models/transaction_not_open.py | 113 - foundry/models/transaction_status.py | 11 +- foundry/models/transaction_type.py | 13 +- foundry/models/two_dimensional_aggregation.py | 26 +- foundry/models/unknown_distance_unit.py | 113 - .../unknown_distance_unit_parameters.py | 99 - foundry/models/unknown_parameter.py | 113 - .../models/unknown_parameter_parameters.py | 98 - foundry/models/unsupported_object_set.py | 109 - foundry/models/unsupported_type.py | 22 +- .../models/upload_file_permission_denied.py | 113 - .../models/view_object_permission_denied.py | 113 - foundry/py.typed | 0 foundry/rest.py | 197 - openapi.yml | 3379 +---------------- pyproject.toml | 2 +- test/__init__.py | 1 + test/api/test_datasets_api_service_api.py | 4 +- test/auth/test_foundry_auth_token_client.py | 66 +- test/auth/test_foundry_oauth_client.py | 11 +- test/models/test_create_dataset_request.py | 8 +- test/test_api_client.py | 100 +- test/test_docs.py | 9 +- test/test_exceptions.py | 10 +- test/utils.py | 24 +- 525 files changed, 4231 insertions(+), 34624 deletions(-) delete mode 100644 docs/AbortTransactionPermissionDenied.md delete mode 100644 docs/AbortTransactionPermissionDeniedParameters.md delete mode 100644 docs/ActionContainsDuplicateEdits.md delete mode 100644 docs/ActionEditedPropertiesNotFound.md delete mode 100644 docs/ActionNotFound.md delete mode 100644 docs/ActionNotFoundParameters.md delete mode 100644 docs/ActionParameterObjectNotFound.md delete mode 100644 docs/ActionParameterObjectNotFoundParameters.md delete mode 100644 docs/ActionParameterObjectTypeNotFound.md delete mode 100644 docs/ActionTypeNotFound.md delete mode 100644 docs/ActionTypeNotFoundParameters.md delete mode 100644 docs/ActionValidationFailed.md delete mode 100644 docs/ActionValidationFailedParameters.md delete mode 100644 docs/AggregationGroupCountExceededLimit.md delete mode 100644 docs/AggregationGroupCountExceededLimitParameters.md delete mode 100644 docs/ApiFeaturePreviewUsageOnly.md delete mode 100644 docs/ApiUsageDenied.md delete mode 100644 docs/ApplyActionFailed.md delete mode 100644 docs/ApplyActionMode.md delete mode 100644 docs/ApplyActionRequestOptions.md delete mode 100644 docs/AsyncOperationError.md delete mode 100644 docs/AttachmentNotFound.md delete mode 100644 docs/AttachmentNotFoundParameters.md delete mode 100644 docs/AttachmentSizeExceededLimit.md delete mode 100644 docs/AttachmentSizeExceededLimitParameters.md delete mode 100644 docs/BranchAlreadyExists.md delete mode 100644 docs/BranchAlreadyExistsParameters.md delete mode 100644 docs/BranchNotFound.md delete mode 100644 docs/ColumnTypesNotSupported.md delete mode 100644 docs/ColumnTypesNotSupportedParameters.md delete mode 100644 docs/CommitTransactionPermissionDenied.md delete mode 100644 docs/CompositePrimaryKeyNotSupported.md delete mode 100644 docs/CompositePrimaryKeyNotSupportedParameters.md delete mode 100644 docs/CreateBranchPermissionDenied.md delete mode 100644 docs/CreateDatasetPermissionDenied.md delete mode 100644 docs/CreateDatasetPermissionDeniedParameters.md delete mode 100644 docs/CreateTransactionPermissionDenied.md delete mode 100644 docs/DatasetNotFound.md delete mode 100644 docs/DeleteBranchPermissionDenied.md delete mode 100644 docs/DeleteSchemaPermissionDenied.md delete mode 100644 docs/DeleteSchemaPermissionDeniedParameters.md delete mode 100644 docs/DeploymentNotAvailable.md delete mode 100644 docs/DeploymentNotAvailableParameters.md delete mode 100644 docs/DeploymentNotFound.md delete mode 100644 docs/DistanceUnit.md delete mode 100644 docs/DuplicateOrderBy.md delete mode 100644 docs/DuplicateOrderByParameters.md delete mode 100644 docs/EditObjectPermissionDenied.md delete mode 100644 docs/FileAlreadyExists.md delete mode 100644 docs/FileAlreadyExistsParameters.md delete mode 100644 docs/FileNotFoundOnBranch.md delete mode 100644 docs/FileNotFoundOnBranchParameters.md delete mode 100644 docs/FileNotFoundOnTransactionRange.md delete mode 100644 docs/FileNotFoundOnTransactionRangeParameters.md delete mode 100644 docs/FolderNotFound.md delete mode 100644 docs/FolderNotFoundParameters.md delete mode 100644 docs/FunctionEncounteredUserFacingError.md delete mode 100644 docs/FunctionEncounteredUserFacingErrorParameters.md delete mode 100644 docs/FunctionExecutionFailed.md delete mode 100644 docs/FunctionExecutionFailedParameters.md delete mode 100644 docs/FunctionExecutionTimedOut.md delete mode 100644 docs/FunctionInvalidInput.md delete mode 100644 docs/InvalidAggregationRange.md delete mode 100644 docs/InvalidAggregationRangePropertyType.md delete mode 100644 docs/InvalidAggregationRangePropertyTypeParameters.md delete mode 100644 docs/InvalidAggregationRangeValue.md delete mode 100644 docs/InvalidApplyActionOptionCombination.md delete mode 100644 docs/InvalidApplyActionOptionCombinationParameters.md delete mode 100644 docs/InvalidBranchId.md delete mode 100644 docs/InvalidBranchIdParameters.md delete mode 100644 docs/InvalidContentLength.md delete mode 100644 docs/InvalidContentType.md delete mode 100644 docs/InvalidDurationGroupByPropertyType.md delete mode 100644 docs/InvalidDurationGroupByValue.md delete mode 100644 docs/InvalidFields.md delete mode 100644 docs/InvalidFieldsParameters.md delete mode 100644 docs/InvalidGroupId.md delete mode 100644 docs/InvalidGroupIdParameters.md delete mode 100644 docs/InvalidPageSize.md delete mode 100644 docs/InvalidPageSizeParameters.md delete mode 100644 docs/InvalidPageToken.md delete mode 100644 docs/InvalidPageTokenParameters.md delete mode 100644 docs/InvalidParameterCombination.md delete mode 100644 docs/InvalidParameterCombinationParameters.md delete mode 100644 docs/InvalidParameterValue.md delete mode 100644 docs/InvalidParameterValueParameters.md delete mode 100644 docs/InvalidPropertyFilterValue.md delete mode 100644 docs/InvalidPropertyFilterValueParameters.md delete mode 100644 docs/InvalidPropertyFiltersCombination.md delete mode 100644 docs/InvalidPropertyFiltersCombinationParameters.md delete mode 100644 docs/InvalidPropertyType.md delete mode 100644 docs/InvalidPropertyTypeParameters.md delete mode 100644 docs/InvalidPropertyValue.md delete mode 100644 docs/InvalidPropertyValueParameters.md delete mode 100644 docs/InvalidQueryParameterValue.md delete mode 100644 docs/InvalidQueryParameterValueParameters.md delete mode 100644 docs/InvalidRangeQuery.md delete mode 100644 docs/InvalidRangeQueryParameters.md delete mode 100644 docs/InvalidSortOrder.md delete mode 100644 docs/InvalidSortOrderParameters.md delete mode 100644 docs/InvalidSortType.md delete mode 100644 docs/InvalidSortTypeParameters.md delete mode 100644 docs/InvalidTransactionType.md delete mode 100644 docs/InvalidTransactionTypeParameters.md delete mode 100644 docs/InvalidUserId.md delete mode 100644 docs/InvalidUserIdParameters.md delete mode 100644 docs/LanguageModelSource.md delete mode 100644 docs/LanguageModelSourceNotSupported.md delete mode 100644 docs/LanguageModelSourceNotSupportedParameters.md delete mode 100644 docs/LinkAlreadyExists.md delete mode 100644 docs/LinkTypeNotFound.md delete mode 100644 docs/LinkTypeNotFoundParameters.md delete mode 100644 docs/LinkedObjectNotFound.md delete mode 100644 docs/LinkedObjectNotFoundParameters.md delete mode 100644 docs/MalformedPropertyFilters.md delete mode 100644 docs/MalformedPropertyFiltersParameters.md delete mode 100644 docs/MarketplaceActionMappingNotFound.md delete mode 100644 docs/MarketplaceActionMappingNotFoundParameters.md delete mode 100644 docs/MarketplaceInstallationNotFound.md delete mode 100644 docs/MarketplaceInstallationNotFoundParameters.md delete mode 100644 docs/MarketplaceLinkMappingNotFound.md delete mode 100644 docs/MarketplaceLinkMappingNotFoundParameters.md delete mode 100644 docs/MarketplaceObjectMappingNotFound.md delete mode 100644 docs/MarketplaceObjectMappingNotFoundParameters.md delete mode 100644 docs/MarketplaceQueryMappingNotFound.md delete mode 100644 docs/MarketplaceQueryMappingNotFoundParameters.md delete mode 100644 docs/MissingParameter.md delete mode 100644 docs/MissingParameterParameters.md delete mode 100644 docs/MissingPostBody.md delete mode 100644 docs/MultipleGroupByOnFieldNotSupported.md delete mode 100644 docs/MultipleGroupByOnFieldNotSupportedParameters.md delete mode 100644 docs/MultiplePropertyValuesNotSupported.md delete mode 100644 docs/MultiplePropertyValuesNotSupportedParameters.md delete mode 100644 docs/ObjectAlreadyExists.md delete mode 100644 docs/ObjectChanged.md delete mode 100644 docs/ObjectNotFound.md delete mode 100644 docs/ObjectNotFoundParameters.md delete mode 100644 docs/ObjectTypeNotFound.md delete mode 100644 docs/ObjectTypeNotFoundParameters.md delete mode 100644 docs/ObjectTypeNotSynced.md delete mode 100644 docs/ObjectTypeNotSyncedParameters.md delete mode 100644 docs/ObjectsExceededLimit.md delete mode 100644 docs/OntologyEditsExceededLimit.md delete mode 100644 docs/OntologyEditsExceededLimitParameters.md delete mode 100644 docs/OntologyNotFound.md delete mode 100644 docs/OntologyNotFoundParameters.md delete mode 100644 docs/OntologySyncing.md delete mode 100644 docs/OpenTransactionAlreadyExists.md delete mode 100644 docs/OperationNotFound.md delete mode 100644 docs/OperationNotFoundParameters.md delete mode 100644 docs/ParameterObjectNotFound.md delete mode 100644 docs/ParameterObjectNotFoundParameters.md delete mode 100644 docs/ParameterObjectSetRidNotFound.md delete mode 100644 docs/ParameterObjectSetRidNotFoundParameters.md delete mode 100644 docs/ParameterTypeNotSupported.md delete mode 100644 docs/ParameterTypeNotSupportedParameters.md delete mode 100644 docs/ParametersNotFound.md delete mode 100644 docs/ParametersNotFoundParameters.md delete mode 100644 docs/ParentAttachmentPermissionDenied.md delete mode 100644 docs/PropertiesNotFilterable.md delete mode 100644 docs/PropertiesNotFound.md delete mode 100644 docs/PropertiesNotFoundParameters.md delete mode 100644 docs/PropertiesNotSearchable.md delete mode 100644 docs/PropertiesNotSearchableParameters.md delete mode 100644 docs/PropertiesNotSortable.md delete mode 100644 docs/PropertyApiNameNotFound.md delete mode 100644 docs/PropertyApiNameNotFoundParameters.md delete mode 100644 docs/PropertyBaseTypeNotSupported.md delete mode 100644 docs/PropertyFiltersNotSupported.md delete mode 100644 docs/PropertyTypesSearchNotSupported.md delete mode 100644 docs/PropertyTypesSearchNotSupportedParameters.md delete mode 100644 docs/PutSchemaPermissionDenied.md delete mode 100644 docs/QueryEncounteredUserFacingError.md delete mode 100644 docs/QueryMemoryExceededLimit.md delete mode 100644 docs/QueryNotFound.md delete mode 100644 docs/QueryNotFoundParameters.md delete mode 100644 docs/QueryTimeExceededLimit.md delete mode 100644 docs/ReadTablePermissionDenied.md delete mode 100644 docs/ResourceNameAlreadyExists.md delete mode 100644 docs/ResourceNameAlreadyExistsParameters.md delete mode 100644 docs/ReturnEditsMode.md delete mode 100644 docs/SchemaNotFound.md delete mode 100644 docs/TransactionNotCommitted.md delete mode 100644 docs/TransactionNotCommittedParameters.md delete mode 100644 docs/TransactionNotFound.md delete mode 100644 docs/TransactionNotOpen.md delete mode 100644 docs/UnknownDistanceUnit.md delete mode 100644 docs/UnknownDistanceUnitParameters.md delete mode 100644 docs/UnknownParameter.md delete mode 100644 docs/UnknownParameterParameters.md delete mode 100644 docs/UnsupportedObjectSet.md delete mode 100644 docs/UploadFilePermissionDenied.md delete mode 100644 docs/ViewObjectPermissionDenied.md create mode 100644 foundry/_core/__init__.py rename foundry/{auth/_auth_utils.py => _core/auth_utils.py} (88%) create mode 100644 foundry/_core/confidential_client_auth.py create mode 100644 foundry/_core/foundry_token_auth_client.py rename foundry/{auth => _core}/oauth.py (99%) create mode 100644 foundry/_core/oauth_utils.py create mode 100644 foundry/_core/palantir_session.py create mode 100644 foundry/_core/public_client_auth.py create mode 100644 foundry/_errors/environment_not_configured.py create mode 100644 foundry/_errors/helpers.py create mode 100644 foundry/_errors/not_authenticated.py create mode 100644 foundry/_errors/palantir_rpc_exception.py create mode 100644 foundry/_errors/sdk_internal_error.py rename foundry/{versions.py => _versions.py} (85%) delete mode 100644 foundry/api_response.py delete mode 100644 foundry/auth/_oauth_utils.py delete mode 100644 foundry/auth/foundry_auth_token_client.py delete mode 100644 foundry/auth/foundry_oauth_client.py delete mode 100644 foundry/configuration.py delete mode 100644 foundry/exceptions.py delete mode 100644 foundry/models/abort_transaction_permission_denied.py delete mode 100644 foundry/models/abort_transaction_permission_denied_parameters.py delete mode 100644 foundry/models/action_contains_duplicate_edits.py delete mode 100644 foundry/models/action_edited_properties_not_found.py delete mode 100644 foundry/models/action_not_found.py delete mode 100644 foundry/models/action_not_found_parameters.py delete mode 100644 foundry/models/action_parameter_object_not_found.py delete mode 100644 foundry/models/action_parameter_object_not_found_parameters.py delete mode 100644 foundry/models/action_parameter_object_type_not_found.py delete mode 100644 foundry/models/action_type_not_found.py delete mode 100644 foundry/models/action_type_not_found_parameters.py delete mode 100644 foundry/models/action_validation_failed.py delete mode 100644 foundry/models/action_validation_failed_parameters.py delete mode 100644 foundry/models/aggregation_group_count_exceeded_limit.py delete mode 100644 foundry/models/aggregation_group_count_exceeded_limit_parameters.py delete mode 100644 foundry/models/api_feature_preview_usage_only.py delete mode 100644 foundry/models/api_usage_denied.py delete mode 100644 foundry/models/apply_action_failed.py delete mode 100644 foundry/models/apply_action_mode.py delete mode 100644 foundry/models/apply_action_request_options.py delete mode 100644 foundry/models/async_operation_error.py delete mode 100644 foundry/models/attachment_not_found.py delete mode 100644 foundry/models/attachment_not_found_parameters.py delete mode 100644 foundry/models/attachment_size_exceeded_limit.py delete mode 100644 foundry/models/attachment_size_exceeded_limit_parameters.py delete mode 100644 foundry/models/branch_already_exists.py delete mode 100644 foundry/models/branch_already_exists_parameters.py delete mode 100644 foundry/models/branch_not_found.py delete mode 100644 foundry/models/column_types_not_supported.py delete mode 100644 foundry/models/column_types_not_supported_parameters.py delete mode 100644 foundry/models/commit_transaction_permission_denied.py delete mode 100644 foundry/models/composite_primary_key_not_supported.py delete mode 100644 foundry/models/composite_primary_key_not_supported_parameters.py delete mode 100644 foundry/models/create_branch_permission_denied.py delete mode 100644 foundry/models/create_dataset_permission_denied.py delete mode 100644 foundry/models/create_dataset_permission_denied_parameters.py delete mode 100644 foundry/models/create_transaction_permission_denied.py delete mode 100644 foundry/models/dataset_not_found.py delete mode 100644 foundry/models/delete_branch_permission_denied.py delete mode 100644 foundry/models/delete_schema_permission_denied.py delete mode 100644 foundry/models/delete_schema_permission_denied_parameters.py delete mode 100644 foundry/models/deployment_not_available.py delete mode 100644 foundry/models/deployment_not_available_parameters.py delete mode 100644 foundry/models/deployment_not_found.py delete mode 100644 foundry/models/distance_unit.py delete mode 100644 foundry/models/duplicate_order_by.py delete mode 100644 foundry/models/duplicate_order_by_parameters.py delete mode 100644 foundry/models/edit_object_permission_denied.py delete mode 100644 foundry/models/file_already_exists.py delete mode 100644 foundry/models/file_already_exists_parameters.py delete mode 100644 foundry/models/file_not_found_on_branch.py delete mode 100644 foundry/models/file_not_found_on_branch_parameters.py delete mode 100644 foundry/models/file_not_found_on_transaction_range.py delete mode 100644 foundry/models/file_not_found_on_transaction_range_parameters.py delete mode 100644 foundry/models/folder_not_found.py delete mode 100644 foundry/models/folder_not_found_parameters.py delete mode 100644 foundry/models/function_encountered_user_facing_error.py delete mode 100644 foundry/models/function_encountered_user_facing_error_parameters.py delete mode 100644 foundry/models/function_execution_failed.py delete mode 100644 foundry/models/function_execution_failed_parameters.py delete mode 100644 foundry/models/function_execution_timed_out.py delete mode 100644 foundry/models/function_invalid_input.py delete mode 100644 foundry/models/invalid_aggregation_range.py delete mode 100644 foundry/models/invalid_aggregation_range_property_type.py delete mode 100644 foundry/models/invalid_aggregation_range_property_type_parameters.py delete mode 100644 foundry/models/invalid_aggregation_range_value.py delete mode 100644 foundry/models/invalid_apply_action_option_combination.py delete mode 100644 foundry/models/invalid_apply_action_option_combination_parameters.py delete mode 100644 foundry/models/invalid_branch_id.py delete mode 100644 foundry/models/invalid_branch_id_parameters.py delete mode 100644 foundry/models/invalid_content_length.py delete mode 100644 foundry/models/invalid_content_type.py delete mode 100644 foundry/models/invalid_duration_group_by_property_type.py delete mode 100644 foundry/models/invalid_duration_group_by_value.py delete mode 100644 foundry/models/invalid_fields.py delete mode 100644 foundry/models/invalid_fields_parameters.py delete mode 100644 foundry/models/invalid_group_id.py delete mode 100644 foundry/models/invalid_group_id_parameters.py delete mode 100644 foundry/models/invalid_page_size.py delete mode 100644 foundry/models/invalid_page_size_parameters.py delete mode 100644 foundry/models/invalid_page_token.py delete mode 100644 foundry/models/invalid_page_token_parameters.py delete mode 100644 foundry/models/invalid_parameter_combination.py delete mode 100644 foundry/models/invalid_parameter_combination_parameters.py delete mode 100644 foundry/models/invalid_parameter_value.py delete mode 100644 foundry/models/invalid_parameter_value_parameters.py delete mode 100644 foundry/models/invalid_property_filter_value.py delete mode 100644 foundry/models/invalid_property_filter_value_parameters.py delete mode 100644 foundry/models/invalid_property_filters_combination.py delete mode 100644 foundry/models/invalid_property_filters_combination_parameters.py delete mode 100644 foundry/models/invalid_property_type.py delete mode 100644 foundry/models/invalid_property_type_parameters.py delete mode 100644 foundry/models/invalid_property_value.py delete mode 100644 foundry/models/invalid_property_value_parameters.py delete mode 100644 foundry/models/invalid_query_parameter_value.py delete mode 100644 foundry/models/invalid_query_parameter_value_parameters.py delete mode 100644 foundry/models/invalid_range_query.py delete mode 100644 foundry/models/invalid_range_query_parameters.py delete mode 100644 foundry/models/invalid_sort_order.py delete mode 100644 foundry/models/invalid_sort_order_parameters.py delete mode 100644 foundry/models/invalid_sort_type.py delete mode 100644 foundry/models/invalid_sort_type_parameters.py delete mode 100644 foundry/models/invalid_transaction_type.py delete mode 100644 foundry/models/invalid_transaction_type_parameters.py delete mode 100644 foundry/models/invalid_user_id.py delete mode 100644 foundry/models/invalid_user_id_parameters.py delete mode 100644 foundry/models/language_model_source.py delete mode 100644 foundry/models/language_model_source_not_supported.py delete mode 100644 foundry/models/language_model_source_not_supported_parameters.py delete mode 100644 foundry/models/link_already_exists.py delete mode 100644 foundry/models/link_type_not_found.py delete mode 100644 foundry/models/link_type_not_found_parameters.py delete mode 100644 foundry/models/linked_object_not_found.py delete mode 100644 foundry/models/linked_object_not_found_parameters.py delete mode 100644 foundry/models/malformed_property_filters.py delete mode 100644 foundry/models/malformed_property_filters_parameters.py delete mode 100644 foundry/models/marketplace_action_mapping_not_found.py delete mode 100644 foundry/models/marketplace_action_mapping_not_found_parameters.py delete mode 100644 foundry/models/marketplace_installation_not_found.py delete mode 100644 foundry/models/marketplace_installation_not_found_parameters.py delete mode 100644 foundry/models/marketplace_link_mapping_not_found.py delete mode 100644 foundry/models/marketplace_link_mapping_not_found_parameters.py delete mode 100644 foundry/models/marketplace_object_mapping_not_found.py delete mode 100644 foundry/models/marketplace_object_mapping_not_found_parameters.py delete mode 100644 foundry/models/marketplace_query_mapping_not_found.py delete mode 100644 foundry/models/marketplace_query_mapping_not_found_parameters.py delete mode 100644 foundry/models/missing_parameter.py delete mode 100644 foundry/models/missing_parameter_parameters.py delete mode 100644 foundry/models/missing_post_body.py delete mode 100644 foundry/models/multiple_group_by_on_field_not_supported.py delete mode 100644 foundry/models/multiple_group_by_on_field_not_supported_parameters.py delete mode 100644 foundry/models/multiple_property_values_not_supported.py delete mode 100644 foundry/models/multiple_property_values_not_supported_parameters.py delete mode 100644 foundry/models/object_already_exists.py delete mode 100644 foundry/models/object_changed.py delete mode 100644 foundry/models/object_not_found.py delete mode 100644 foundry/models/object_not_found_parameters.py delete mode 100644 foundry/models/object_type_not_found.py delete mode 100644 foundry/models/object_type_not_found_parameters.py delete mode 100644 foundry/models/object_type_not_synced.py delete mode 100644 foundry/models/object_type_not_synced_parameters.py delete mode 100644 foundry/models/objects_exceeded_limit.py delete mode 100644 foundry/models/ontology_edits_exceeded_limit.py delete mode 100644 foundry/models/ontology_edits_exceeded_limit_parameters.py delete mode 100644 foundry/models/ontology_not_found.py delete mode 100644 foundry/models/ontology_not_found_parameters.py delete mode 100644 foundry/models/ontology_syncing.py delete mode 100644 foundry/models/open_transaction_already_exists.py delete mode 100644 foundry/models/operation_not_found.py delete mode 100644 foundry/models/operation_not_found_parameters.py delete mode 100644 foundry/models/parameter_object_not_found.py delete mode 100644 foundry/models/parameter_object_not_found_parameters.py delete mode 100644 foundry/models/parameter_object_set_rid_not_found.py delete mode 100644 foundry/models/parameter_object_set_rid_not_found_parameters.py delete mode 100644 foundry/models/parameter_type_not_supported.py delete mode 100644 foundry/models/parameter_type_not_supported_parameters.py delete mode 100644 foundry/models/parameters_not_found.py delete mode 100644 foundry/models/parameters_not_found_parameters.py delete mode 100644 foundry/models/parent_attachment_permission_denied.py delete mode 100644 foundry/models/properties_not_filterable.py delete mode 100644 foundry/models/properties_not_found.py delete mode 100644 foundry/models/properties_not_found_parameters.py delete mode 100644 foundry/models/properties_not_searchable.py delete mode 100644 foundry/models/properties_not_searchable_parameters.py delete mode 100644 foundry/models/properties_not_sortable.py delete mode 100644 foundry/models/property_api_name_not_found.py delete mode 100644 foundry/models/property_api_name_not_found_parameters.py delete mode 100644 foundry/models/property_base_type_not_supported.py delete mode 100644 foundry/models/property_filters_not_supported.py delete mode 100644 foundry/models/property_types_search_not_supported.py delete mode 100644 foundry/models/property_types_search_not_supported_parameters.py delete mode 100644 foundry/models/put_schema_permission_denied.py delete mode 100644 foundry/models/query_encountered_user_facing_error.py delete mode 100644 foundry/models/query_memory_exceeded_limit.py delete mode 100644 foundry/models/query_not_found.py delete mode 100644 foundry/models/query_not_found_parameters.py delete mode 100644 foundry/models/query_time_exceeded_limit.py delete mode 100644 foundry/models/read_table_permission_denied.py delete mode 100644 foundry/models/resource_name_already_exists.py delete mode 100644 foundry/models/resource_name_already_exists_parameters.py delete mode 100644 foundry/models/return_edits_mode.py delete mode 100644 foundry/models/schema_not_found.py delete mode 100644 foundry/models/transaction_not_committed.py delete mode 100644 foundry/models/transaction_not_committed_parameters.py delete mode 100644 foundry/models/transaction_not_found.py delete mode 100644 foundry/models/transaction_not_open.py delete mode 100644 foundry/models/unknown_distance_unit.py delete mode 100644 foundry/models/unknown_distance_unit_parameters.py delete mode 100644 foundry/models/unknown_parameter.py delete mode 100644 foundry/models/unknown_parameter_parameters.py delete mode 100644 foundry/models/unsupported_object_set.py delete mode 100644 foundry/models/upload_file_permission_denied.py delete mode 100644 foundry/models/view_object_permission_denied.py delete mode 100644 foundry/py.typed delete mode 100644 foundry/rest.py diff --git a/README.md b/README.md index 1700f0525..0662bf018 100644 --- a/README.md +++ b/README.md @@ -54,14 +54,20 @@ There are two options for authorizing the SDK. > production applications, you should register an OAuth2 application (see > [OAuth2 Client](#oauth2-client) below for more details). + + +You can pass in the hostname and token as keyword arguments when +initializing the `UserTokenAuth`: ```python foundry_client = foundry.FoundryClient( @@ -69,6 +75,7 @@ foundry_client = foundry.FoundryClient( hostname="example.palantirfoundry.com", token=os.environ["BEARER_TOKEN"], ), + hostname="example.palantirfoundry.com", ) ``` @@ -101,7 +108,7 @@ auth.sign_in_as_service_user() After creating the `ConfidentialClientAuth` object, pass it in to the `FoundryClient`, ```python -foundry_client = foundry.FoundryClient(auth=auth) +foundry_client = foundry.FoundryClient(auth=auth, hostname="example.palantirfoundry.com") ``` ## Quickstart @@ -115,9 +122,11 @@ purposes. import time import foundry from foundry.rest import ApiException +from foundry import FoundryClient +from foundry import UserTokenAuth from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = FoundryClient(auth=UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Transaction. transaction_rid = 'ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496' # str | The Resource Identifier (RID) of the Transaction. @@ -374,158 +383,44 @@ Class | Method | HTTP request | Description ## Documentation for models - - [AbortTransactionPermissionDenied](docs/AbortTransactionPermissionDenied.md) - - [AbortTransactionPermissionDeniedParameters](docs/AbortTransactionPermissionDeniedParameters.md) - - [ActionContainsDuplicateEdits](docs/ActionContainsDuplicateEdits.md) - - [ActionEditedPropertiesNotFound](docs/ActionEditedPropertiesNotFound.md) - - [ActionNotFound](docs/ActionNotFound.md) - - [ActionNotFoundParameters](docs/ActionNotFoundParameters.md) - [ActionParameterArrayType](docs/ActionParameterArrayType.md) - - [ActionParameterObjectNotFound](docs/ActionParameterObjectNotFound.md) - - [ActionParameterObjectNotFoundParameters](docs/ActionParameterObjectNotFoundParameters.md) - - [ActionParameterObjectTypeNotFound](docs/ActionParameterObjectTypeNotFound.md) - [ActionParameterType](docs/ActionParameterType.md) - [ActionParameterV2](docs/ActionParameterV2.md) - [ActionType](docs/ActionType.md) - - [ActionTypeNotFound](docs/ActionTypeNotFound.md) - - [ActionTypeNotFoundParameters](docs/ActionTypeNotFoundParameters.md) - [ActionTypeV2](docs/ActionTypeV2.md) - - [ActionValidationFailed](docs/ActionValidationFailed.md) - - [ActionValidationFailedParameters](docs/ActionValidationFailedParameters.md) - - [AggregationGroupCountExceededLimit](docs/AggregationGroupCountExceededLimit.md) - - [AggregationGroupCountExceededLimitParameters](docs/AggregationGroupCountExceededLimitParameters.md) - [AnyType](docs/AnyType.md) - - [ApiFeaturePreviewUsageOnly](docs/ApiFeaturePreviewUsageOnly.md) - - [ApiUsageDenied](docs/ApiUsageDenied.md) - - [ApplyActionFailed](docs/ApplyActionFailed.md) - - [ApplyActionMode](docs/ApplyActionMode.md) - - [ApplyActionRequestOptions](docs/ApplyActionRequestOptions.md) - - [AsyncOperationError](docs/AsyncOperationError.md) - - [AttachmentNotFound](docs/AttachmentNotFound.md) - - [AttachmentNotFoundParameters](docs/AttachmentNotFoundParameters.md) - - [AttachmentSizeExceededLimit](docs/AttachmentSizeExceededLimit.md) - - [AttachmentSizeExceededLimitParameters](docs/AttachmentSizeExceededLimitParameters.md) - [AttachmentType](docs/AttachmentType.md) - [BinaryType](docs/BinaryType.md) - [BooleanType](docs/BooleanType.md) - [Branch](docs/Branch.md) - - [BranchAlreadyExists](docs/BranchAlreadyExists.md) - - [BranchAlreadyExistsParameters](docs/BranchAlreadyExistsParameters.md) - - [BranchNotFound](docs/BranchNotFound.md) - [ByteType](docs/ByteType.md) - - [ColumnTypesNotSupported](docs/ColumnTypesNotSupported.md) - - [ColumnTypesNotSupportedParameters](docs/ColumnTypesNotSupportedParameters.md) - - [CommitTransactionPermissionDenied](docs/CommitTransactionPermissionDenied.md) - - [CompositePrimaryKeyNotSupported](docs/CompositePrimaryKeyNotSupported.md) - - [CompositePrimaryKeyNotSupportedParameters](docs/CompositePrimaryKeyNotSupportedParameters.md) - - [CreateBranchPermissionDenied](docs/CreateBranchPermissionDenied.md) - [CreateBranchRequest](docs/CreateBranchRequest.md) - - [CreateDatasetPermissionDenied](docs/CreateDatasetPermissionDenied.md) - - [CreateDatasetPermissionDeniedParameters](docs/CreateDatasetPermissionDeniedParameters.md) - [CreateDatasetRequest](docs/CreateDatasetRequest.md) - [CreateLinkRule](docs/CreateLinkRule.md) - [CreateObjectRule](docs/CreateObjectRule.md) - - [CreateTransactionPermissionDenied](docs/CreateTransactionPermissionDenied.md) - [CreateTransactionRequest](docs/CreateTransactionRequest.md) - [Dataset](docs/Dataset.md) - - [DatasetNotFound](docs/DatasetNotFound.md) - [DateType](docs/DateType.md) - [DecimalType](docs/DecimalType.md) - - [DeleteBranchPermissionDenied](docs/DeleteBranchPermissionDenied.md) - [DeleteLinkRule](docs/DeleteLinkRule.md) - [DeleteObjectRule](docs/DeleteObjectRule.md) - - [DeleteSchemaPermissionDenied](docs/DeleteSchemaPermissionDenied.md) - - [DeleteSchemaPermissionDeniedParameters](docs/DeleteSchemaPermissionDeniedParameters.md) - [DeploymentApi](docs/DeploymentApi.md) - [DeploymentListing](docs/DeploymentListing.md) - [DeploymentMetadata](docs/DeploymentMetadata.md) - - [DeploymentNotAvailable](docs/DeploymentNotAvailable.md) - - [DeploymentNotAvailableParameters](docs/DeploymentNotAvailableParameters.md) - - [DeploymentNotFound](docs/DeploymentNotFound.md) - [DeploymentTransformApi](docs/DeploymentTransformApi.md) - - [DistanceUnit](docs/DistanceUnit.md) - [DoubleType](docs/DoubleType.md) - - [DuplicateOrderBy](docs/DuplicateOrderBy.md) - - [DuplicateOrderByParameters](docs/DuplicateOrderByParameters.md) - - [EditObjectPermissionDenied](docs/EditObjectPermissionDenied.md) - [File](docs/File.md) - - [FileAlreadyExists](docs/FileAlreadyExists.md) - - [FileAlreadyExistsParameters](docs/FileAlreadyExistsParameters.md) - - [FileNotFoundOnBranch](docs/FileNotFoundOnBranch.md) - - [FileNotFoundOnBranchParameters](docs/FileNotFoundOnBranchParameters.md) - - [FileNotFoundOnTransactionRange](docs/FileNotFoundOnTransactionRange.md) - - [FileNotFoundOnTransactionRangeParameters](docs/FileNotFoundOnTransactionRangeParameters.md) - [FloatType](docs/FloatType.md) - - [FolderNotFound](docs/FolderNotFound.md) - - [FolderNotFoundParameters](docs/FolderNotFoundParameters.md) - - [FunctionEncounteredUserFacingError](docs/FunctionEncounteredUserFacingError.md) - - [FunctionEncounteredUserFacingErrorParameters](docs/FunctionEncounteredUserFacingErrorParameters.md) - - [FunctionExecutionFailed](docs/FunctionExecutionFailed.md) - - [FunctionExecutionFailedParameters](docs/FunctionExecutionFailedParameters.md) - - [FunctionExecutionTimedOut](docs/FunctionExecutionTimedOut.md) - - [FunctionInvalidInput](docs/FunctionInvalidInput.md) - [GeoPoint](docs/GeoPoint.md) - [GeoPointType](docs/GeoPointType.md) - [GeoShapeType](docs/GeoShapeType.md) - [Geometry](docs/Geometry.md) - [GeometryCollection](docs/GeometryCollection.md) - [IntegerType](docs/IntegerType.md) - - [InvalidAggregationRange](docs/InvalidAggregationRange.md) - - [InvalidAggregationRangePropertyType](docs/InvalidAggregationRangePropertyType.md) - - [InvalidAggregationRangePropertyTypeParameters](docs/InvalidAggregationRangePropertyTypeParameters.md) - - [InvalidAggregationRangeValue](docs/InvalidAggregationRangeValue.md) - - [InvalidApplyActionOptionCombination](docs/InvalidApplyActionOptionCombination.md) - - [InvalidApplyActionOptionCombinationParameters](docs/InvalidApplyActionOptionCombinationParameters.md) - - [InvalidBranchId](docs/InvalidBranchId.md) - - [InvalidBranchIdParameters](docs/InvalidBranchIdParameters.md) - - [InvalidContentLength](docs/InvalidContentLength.md) - - [InvalidContentType](docs/InvalidContentType.md) - - [InvalidDurationGroupByPropertyType](docs/InvalidDurationGroupByPropertyType.md) - - [InvalidDurationGroupByValue](docs/InvalidDurationGroupByValue.md) - - [InvalidFields](docs/InvalidFields.md) - - [InvalidFieldsParameters](docs/InvalidFieldsParameters.md) - - [InvalidGroupId](docs/InvalidGroupId.md) - - [InvalidGroupIdParameters](docs/InvalidGroupIdParameters.md) - - [InvalidPageSize](docs/InvalidPageSize.md) - - [InvalidPageSizeParameters](docs/InvalidPageSizeParameters.md) - - [InvalidPageToken](docs/InvalidPageToken.md) - - [InvalidPageTokenParameters](docs/InvalidPageTokenParameters.md) - - [InvalidParameterCombination](docs/InvalidParameterCombination.md) - - [InvalidParameterCombinationParameters](docs/InvalidParameterCombinationParameters.md) - - [InvalidParameterValue](docs/InvalidParameterValue.md) - - [InvalidParameterValueParameters](docs/InvalidParameterValueParameters.md) - - [InvalidPropertyFilterValue](docs/InvalidPropertyFilterValue.md) - - [InvalidPropertyFilterValueParameters](docs/InvalidPropertyFilterValueParameters.md) - - [InvalidPropertyFiltersCombination](docs/InvalidPropertyFiltersCombination.md) - - [InvalidPropertyFiltersCombinationParameters](docs/InvalidPropertyFiltersCombinationParameters.md) - - [InvalidPropertyType](docs/InvalidPropertyType.md) - - [InvalidPropertyTypeParameters](docs/InvalidPropertyTypeParameters.md) - - [InvalidPropertyValue](docs/InvalidPropertyValue.md) - - [InvalidPropertyValueParameters](docs/InvalidPropertyValueParameters.md) - - [InvalidQueryParameterValue](docs/InvalidQueryParameterValue.md) - - [InvalidQueryParameterValueParameters](docs/InvalidQueryParameterValueParameters.md) - - [InvalidRangeQuery](docs/InvalidRangeQuery.md) - - [InvalidRangeQueryParameters](docs/InvalidRangeQueryParameters.md) - - [InvalidSortOrder](docs/InvalidSortOrder.md) - - [InvalidSortOrderParameters](docs/InvalidSortOrderParameters.md) - - [InvalidSortType](docs/InvalidSortType.md) - - [InvalidSortTypeParameters](docs/InvalidSortTypeParameters.md) - - [InvalidTransactionType](docs/InvalidTransactionType.md) - - [InvalidTransactionTypeParameters](docs/InvalidTransactionTypeParameters.md) - - [InvalidUserId](docs/InvalidUserId.md) - - [InvalidUserIdParameters](docs/InvalidUserIdParameters.md) - - [LanguageModelSource](docs/LanguageModelSource.md) - - [LanguageModelSourceNotSupported](docs/LanguageModelSourceNotSupported.md) - - [LanguageModelSourceNotSupportedParameters](docs/LanguageModelSourceNotSupportedParameters.md) - [LineString](docs/LineString.md) - - [LinkAlreadyExists](docs/LinkAlreadyExists.md) - - [LinkTypeNotFound](docs/LinkTypeNotFound.md) - - [LinkTypeNotFoundParameters](docs/LinkTypeNotFoundParameters.md) - [LinkTypeSide](docs/LinkTypeSide.md) - [LinkTypeSideCardinality](docs/LinkTypeSideCardinality.md) - [LinkTypeSideV2](docs/LinkTypeSideV2.md) - - [LinkedObjectNotFound](docs/LinkedObjectNotFound.md) - - [LinkedObjectNotFoundParameters](docs/LinkedObjectNotFoundParameters.md) - [ListActionTypesResponse](docs/ListActionTypesResponse.md) - [ListActionTypesResponseV2](docs/ListActionTypesResponseV2.md) - [ListBranchesResponse](docs/ListBranchesResponse.md) @@ -541,21 +436,6 @@ Class | Method | HTTP request | Description - [ListQueryTypesResponseV2](docs/ListQueryTypesResponseV2.md) - [LogicRule](docs/LogicRule.md) - [LongType](docs/LongType.md) - - [MalformedPropertyFilters](docs/MalformedPropertyFilters.md) - - [MalformedPropertyFiltersParameters](docs/MalformedPropertyFiltersParameters.md) - - [MarketplaceActionMappingNotFound](docs/MarketplaceActionMappingNotFound.md) - - [MarketplaceActionMappingNotFoundParameters](docs/MarketplaceActionMappingNotFoundParameters.md) - - [MarketplaceInstallationNotFound](docs/MarketplaceInstallationNotFound.md) - - [MarketplaceInstallationNotFoundParameters](docs/MarketplaceInstallationNotFoundParameters.md) - - [MarketplaceLinkMappingNotFound](docs/MarketplaceLinkMappingNotFound.md) - - [MarketplaceLinkMappingNotFoundParameters](docs/MarketplaceLinkMappingNotFoundParameters.md) - - [MarketplaceObjectMappingNotFound](docs/MarketplaceObjectMappingNotFound.md) - - [MarketplaceObjectMappingNotFoundParameters](docs/MarketplaceObjectMappingNotFoundParameters.md) - - [MarketplaceQueryMappingNotFound](docs/MarketplaceQueryMappingNotFound.md) - - [MarketplaceQueryMappingNotFoundParameters](docs/MarketplaceQueryMappingNotFoundParameters.md) - - [MissingParameter](docs/MissingParameter.md) - - [MissingParameterParameters](docs/MissingParameterParameters.md) - - [MissingPostBody](docs/MissingPostBody.md) - [ModelApiArrayType](docs/ModelApiArrayType.md) - [ModelApiDataType](docs/ModelApiDataType.md) - [ModelApiMapType](docs/ModelApiMapType.md) @@ -568,94 +448,41 @@ Class | Method | HTTP request | Description - [MultiLineString](docs/MultiLineString.md) - [MultiPoint](docs/MultiPoint.md) - [MultiPolygon](docs/MultiPolygon.md) - - [MultipleGroupByOnFieldNotSupported](docs/MultipleGroupByOnFieldNotSupported.md) - - [MultipleGroupByOnFieldNotSupportedParameters](docs/MultipleGroupByOnFieldNotSupportedParameters.md) - - [MultiplePropertyValuesNotSupported](docs/MultiplePropertyValuesNotSupported.md) - - [MultiplePropertyValuesNotSupportedParameters](docs/MultiplePropertyValuesNotSupportedParameters.md) - [NullType](docs/NullType.md) - - [ObjectAlreadyExists](docs/ObjectAlreadyExists.md) - - [ObjectChanged](docs/ObjectChanged.md) - - [ObjectNotFound](docs/ObjectNotFound.md) - - [ObjectNotFoundParameters](docs/ObjectNotFoundParameters.md) - [ObjectPropertyType](docs/ObjectPropertyType.md) - [ObjectType](docs/ObjectType.md) - - [ObjectTypeNotFound](docs/ObjectTypeNotFound.md) - - [ObjectTypeNotFoundParameters](docs/ObjectTypeNotFoundParameters.md) - - [ObjectTypeNotSynced](docs/ObjectTypeNotSynced.md) - - [ObjectTypeNotSyncedParameters](docs/ObjectTypeNotSyncedParameters.md) - [ObjectTypeV2](docs/ObjectTypeV2.md) - [ObjectTypeVisibility](docs/ObjectTypeVisibility.md) - [ObjectTypeWithLink](docs/ObjectTypeWithLink.md) - - [ObjectsExceededLimit](docs/ObjectsExceededLimit.md) - [Ontology](docs/Ontology.md) - [OntologyArrayType](docs/OntologyArrayType.md) - [OntologyDataType](docs/OntologyDataType.md) - - [OntologyEditsExceededLimit](docs/OntologyEditsExceededLimit.md) - - [OntologyEditsExceededLimitParameters](docs/OntologyEditsExceededLimitParameters.md) - [OntologyFullMetadata](docs/OntologyFullMetadata.md) - [OntologyMapType](docs/OntologyMapType.md) - - [OntologyNotFound](docs/OntologyNotFound.md) - - [OntologyNotFoundParameters](docs/OntologyNotFoundParameters.md) - [OntologyObjectArrayType](docs/OntologyObjectArrayType.md) - [OntologyObjectSetType](docs/OntologyObjectSetType.md) - [OntologyObjectType](docs/OntologyObjectType.md) - [OntologySetType](docs/OntologySetType.md) - [OntologyStructField](docs/OntologyStructField.md) - [OntologyStructType](docs/OntologyStructType.md) - - [OntologySyncing](docs/OntologySyncing.md) - [OntologyV2](docs/OntologyV2.md) - - [OpenTransactionAlreadyExists](docs/OpenTransactionAlreadyExists.md) - - [OperationNotFound](docs/OperationNotFound.md) - - [OperationNotFoundParameters](docs/OperationNotFoundParameters.md) - [Parameter](docs/Parameter.md) - - [ParameterObjectNotFound](docs/ParameterObjectNotFound.md) - - [ParameterObjectNotFoundParameters](docs/ParameterObjectNotFoundParameters.md) - - [ParameterObjectSetRidNotFound](docs/ParameterObjectSetRidNotFound.md) - - [ParameterObjectSetRidNotFoundParameters](docs/ParameterObjectSetRidNotFoundParameters.md) - - [ParameterTypeNotSupported](docs/ParameterTypeNotSupported.md) - - [ParameterTypeNotSupportedParameters](docs/ParameterTypeNotSupportedParameters.md) - - [ParametersNotFound](docs/ParametersNotFound.md) - - [ParametersNotFoundParameters](docs/ParametersNotFoundParameters.md) - - [ParentAttachmentPermissionDenied](docs/ParentAttachmentPermissionDenied.md) - [Polygon](docs/Polygon.md) - - [PropertiesNotFilterable](docs/PropertiesNotFilterable.md) - - [PropertiesNotFound](docs/PropertiesNotFound.md) - - [PropertiesNotFoundParameters](docs/PropertiesNotFoundParameters.md) - - [PropertiesNotSearchable](docs/PropertiesNotSearchable.md) - - [PropertiesNotSearchableParameters](docs/PropertiesNotSearchableParameters.md) - - [PropertiesNotSortable](docs/PropertiesNotSortable.md) - - [PropertyApiNameNotFound](docs/PropertyApiNameNotFound.md) - - [PropertyApiNameNotFoundParameters](docs/PropertyApiNameNotFoundParameters.md) - - [PropertyBaseTypeNotSupported](docs/PropertyBaseTypeNotSupported.md) - - [PropertyFiltersNotSupported](docs/PropertyFiltersNotSupported.md) - - [PropertyTypesSearchNotSupported](docs/PropertyTypesSearchNotSupported.md) - - [PropertyTypesSearchNotSupportedParameters](docs/PropertyTypesSearchNotSupportedParameters.md) - [PropertyV2](docs/PropertyV2.md) - - [PutSchemaPermissionDenied](docs/PutSchemaPermissionDenied.md) - [QueryAggregationKeyType](docs/QueryAggregationKeyType.md) - [QueryAggregationRangeSubType](docs/QueryAggregationRangeSubType.md) - [QueryAggregationRangeType](docs/QueryAggregationRangeType.md) - [QueryAggregationValueType](docs/QueryAggregationValueType.md) - [QueryArrayType](docs/QueryArrayType.md) - [QueryDataType](docs/QueryDataType.md) - - [QueryEncounteredUserFacingError](docs/QueryEncounteredUserFacingError.md) - - [QueryMemoryExceededLimit](docs/QueryMemoryExceededLimit.md) - - [QueryNotFound](docs/QueryNotFound.md) - - [QueryNotFoundParameters](docs/QueryNotFoundParameters.md) - [QueryParameterV2](docs/QueryParameterV2.md) - [QuerySetType](docs/QuerySetType.md) - [QueryStructField](docs/QueryStructField.md) - [QueryStructType](docs/QueryStructType.md) - - [QueryTimeExceededLimit](docs/QueryTimeExceededLimit.md) - [QueryType](docs/QueryType.md) - [QueryTypeV2](docs/QueryTypeV2.md) - [QueryUnionType](docs/QueryUnionType.md) - - [ReadTablePermissionDenied](docs/ReadTablePermissionDenied.md) - [ReleaseStatus](docs/ReleaseStatus.md) - - [ResourceNameAlreadyExists](docs/ResourceNameAlreadyExists.md) - - [ResourceNameAlreadyExistsParameters](docs/ResourceNameAlreadyExistsParameters.md) - - [ReturnEditsMode](docs/ReturnEditsMode.md) - - [SchemaNotFound](docs/SchemaNotFound.md) - [ShortType](docs/ShortType.md) - [StringType](docs/StringType.md) - [TableExportFormat](docs/TableExportFormat.md) @@ -664,21 +491,10 @@ Class | Method | HTTP request | Description - [TimeseriesType](docs/TimeseriesType.md) - [TimestampType](docs/TimestampType.md) - [Transaction](docs/Transaction.md) - - [TransactionNotCommitted](docs/TransactionNotCommitted.md) - - [TransactionNotCommittedParameters](docs/TransactionNotCommittedParameters.md) - - [TransactionNotFound](docs/TransactionNotFound.md) - - [TransactionNotOpen](docs/TransactionNotOpen.md) - [TransactionStatus](docs/TransactionStatus.md) - [TransactionType](docs/TransactionType.md) - [TwoDimensionalAggregation](docs/TwoDimensionalAggregation.md) - - [UnknownDistanceUnit](docs/UnknownDistanceUnit.md) - - [UnknownDistanceUnitParameters](docs/UnknownDistanceUnitParameters.md) - - [UnknownParameter](docs/UnknownParameter.md) - - [UnknownParameterParameters](docs/UnknownParameterParameters.md) - - [UnsupportedObjectSet](docs/UnsupportedObjectSet.md) - [UnsupportedType](docs/UnsupportedType.md) - - [UploadFilePermissionDenied](docs/UploadFilePermissionDenied.md) - - [ViewObjectPermissionDenied](docs/ViewObjectPermissionDenied.md) ## Contributions diff --git a/docs/AbortTransactionPermissionDenied.md b/docs/AbortTransactionPermissionDenied.md deleted file mode 100644 index b9dcfb9f5..000000000 --- a/docs/AbortTransactionPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# AbortTransactionPermissionDenied - -The provided token does not have permission to abort the given treansaction on the given dataset. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AbortTransactionPermissionDeniedParameters**](AbortTransactionPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import AbortTransactionPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of AbortTransactionPermissionDenied from a JSON string -abort_transaction_permission_denied_instance = AbortTransactionPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(AbortTransactionPermissionDenied.to_json()) - -# convert the object into a dict -abort_transaction_permission_denied_dict = abort_transaction_permission_denied_instance.to_dict() -# create an instance of AbortTransactionPermissionDenied from a dict -abort_transaction_permission_denied_form_dict = abort_transaction_permission_denied.from_dict(abort_transaction_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AbortTransactionPermissionDeniedParameters.md b/docs/AbortTransactionPermissionDeniedParameters.md deleted file mode 100644 index c23db9ee6..000000000 --- a/docs/AbortTransactionPermissionDeniedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# AbortTransactionPermissionDeniedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | - -## Example - -```python -from foundry.models import AbortTransactionPermissionDeniedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of AbortTransactionPermissionDeniedParameters from a JSON string -abort_transaction_permission_denied_parameters_instance = AbortTransactionPermissionDeniedParameters.from_json(json) -# print the JSON string representation of the object -print(AbortTransactionPermissionDeniedParameters.to_json()) - -# convert the object into a dict -abort_transaction_permission_denied_parameters_dict = abort_transaction_permission_denied_parameters_instance.to_dict() -# create an instance of AbortTransactionPermissionDeniedParameters from a dict -abort_transaction_permission_denied_parameters_form_dict = abort_transaction_permission_denied_parameters.from_dict(abort_transaction_permission_denied_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionContainsDuplicateEdits.md b/docs/ActionContainsDuplicateEdits.md deleted file mode 100644 index bc4e92499..000000000 --- a/docs/ActionContainsDuplicateEdits.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionContainsDuplicateEdits - -The given action request has multiple edits on the same object. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ActionContainsDuplicateEdits - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionContainsDuplicateEdits from a JSON string -action_contains_duplicate_edits_instance = ActionContainsDuplicateEdits.from_json(json) -# print the JSON string representation of the object -print(ActionContainsDuplicateEdits.to_json()) - -# convert the object into a dict -action_contains_duplicate_edits_dict = action_contains_duplicate_edits_instance.to_dict() -# create an instance of ActionContainsDuplicateEdits from a dict -action_contains_duplicate_edits_form_dict = action_contains_duplicate_edits.from_dict(action_contains_duplicate_edits_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionEditedPropertiesNotFound.md b/docs/ActionEditedPropertiesNotFound.md deleted file mode 100644 index f318dca56..000000000 --- a/docs/ActionEditedPropertiesNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionEditedPropertiesNotFound - -Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ActionEditedPropertiesNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionEditedPropertiesNotFound from a JSON string -action_edited_properties_not_found_instance = ActionEditedPropertiesNotFound.from_json(json) -# print the JSON string representation of the object -print(ActionEditedPropertiesNotFound.to_json()) - -# convert the object into a dict -action_edited_properties_not_found_dict = action_edited_properties_not_found_instance.to_dict() -# create an instance of ActionEditedPropertiesNotFound from a dict -action_edited_properties_not_found_form_dict = action_edited_properties_not_found.from_dict(action_edited_properties_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionNotFound.md b/docs/ActionNotFound.md deleted file mode 100644 index 6d1f550cd..000000000 --- a/docs/ActionNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionNotFound - -The action is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ActionNotFoundParameters**](ActionNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ActionNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionNotFound from a JSON string -action_not_found_instance = ActionNotFound.from_json(json) -# print the JSON string representation of the object -print(ActionNotFound.to_json()) - -# convert the object into a dict -action_not_found_dict = action_not_found_instance.to_dict() -# create an instance of ActionNotFound from a dict -action_not_found_form_dict = action_not_found.from_dict(action_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionNotFoundParameters.md b/docs/ActionNotFoundParameters.md deleted file mode 100644 index ebc089013..000000000 --- a/docs/ActionNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ActionNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_rid** | **str** | The unique resource identifier for an action. | - -## Example - -```python -from foundry.models import ActionNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionNotFoundParameters from a JSON string -action_not_found_parameters_instance = ActionNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ActionNotFoundParameters.to_json()) - -# convert the object into a dict -action_not_found_parameters_dict = action_not_found_parameters_instance.to_dict() -# create an instance of ActionNotFoundParameters from a dict -action_not_found_parameters_form_dict = action_not_found_parameters.from_dict(action_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionParameterObjectNotFound.md b/docs/ActionParameterObjectNotFound.md deleted file mode 100644 index d6acefefc..000000000 --- a/docs/ActionParameterObjectNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionParameterObjectNotFound - -The parameter object reference or parameter default value is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ActionParameterObjectNotFoundParameters**](ActionParameterObjectNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ActionParameterObjectNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionParameterObjectNotFound from a JSON string -action_parameter_object_not_found_instance = ActionParameterObjectNotFound.from_json(json) -# print the JSON string representation of the object -print(ActionParameterObjectNotFound.to_json()) - -# convert the object into a dict -action_parameter_object_not_found_dict = action_parameter_object_not_found_instance.to_dict() -# create an instance of ActionParameterObjectNotFound from a dict -action_parameter_object_not_found_form_dict = action_parameter_object_not_found.from_dict(action_parameter_object_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionParameterObjectNotFoundParameters.md b/docs/ActionParameterObjectNotFoundParameters.md deleted file mode 100644 index fafbaaf5f..000000000 --- a/docs/ActionParameterObjectNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ActionParameterObjectNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameter_id** | **str** | The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. | - -## Example - -```python -from foundry.models import ActionParameterObjectNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionParameterObjectNotFoundParameters from a JSON string -action_parameter_object_not_found_parameters_instance = ActionParameterObjectNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ActionParameterObjectNotFoundParameters.to_json()) - -# convert the object into a dict -action_parameter_object_not_found_parameters_dict = action_parameter_object_not_found_parameters_instance.to_dict() -# create an instance of ActionParameterObjectNotFoundParameters from a dict -action_parameter_object_not_found_parameters_form_dict = action_parameter_object_not_found_parameters.from_dict(action_parameter_object_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionParameterObjectTypeNotFound.md b/docs/ActionParameterObjectTypeNotFound.md deleted file mode 100644 index 04735aacd..000000000 --- a/docs/ActionParameterObjectTypeNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionParameterObjectTypeNotFound - -The parameter references an object type that could not be found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ActionParameterObjectNotFoundParameters**](ActionParameterObjectNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ActionParameterObjectTypeNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionParameterObjectTypeNotFound from a JSON string -action_parameter_object_type_not_found_instance = ActionParameterObjectTypeNotFound.from_json(json) -# print the JSON string representation of the object -print(ActionParameterObjectTypeNotFound.to_json()) - -# convert the object into a dict -action_parameter_object_type_not_found_dict = action_parameter_object_type_not_found_instance.to_dict() -# create an instance of ActionParameterObjectTypeNotFound from a dict -action_parameter_object_type_not_found_form_dict = action_parameter_object_type_not_found.from_dict(action_parameter_object_type_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionTypeNotFound.md b/docs/ActionTypeNotFound.md deleted file mode 100644 index 1c6edfdbb..000000000 --- a/docs/ActionTypeNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionTypeNotFound - -The action type is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ActionTypeNotFoundParameters**](ActionTypeNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ActionTypeNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionTypeNotFound from a JSON string -action_type_not_found_instance = ActionTypeNotFound.from_json(json) -# print the JSON string representation of the object -print(ActionTypeNotFound.to_json()) - -# convert the object into a dict -action_type_not_found_dict = action_type_not_found_instance.to_dict() -# create an instance of ActionTypeNotFound from a dict -action_type_not_found_form_dict = action_type_not_found.from_dict(action_type_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionTypeNotFoundParameters.md b/docs/ActionTypeNotFoundParameters.md deleted file mode 100644 index ceae46298..000000000 --- a/docs/ActionTypeNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ActionTypeNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_type** | **str** | The name of the action type in the API. To find the API name for your Action Type, use the \`List action types\` endpoint or check the **Ontology Manager**. | \[optional\] -**rid** | **str** | The unique resource identifier of an action type, useful for interacting with other Foundry APIs. | \[optional\] - -## Example - -```python -from foundry.models import ActionTypeNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionTypeNotFoundParameters from a JSON string -action_type_not_found_parameters_instance = ActionTypeNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ActionTypeNotFoundParameters.to_json()) - -# convert the object into a dict -action_type_not_found_parameters_dict = action_type_not_found_parameters_instance.to_dict() -# create an instance of ActionTypeNotFoundParameters from a dict -action_type_not_found_parameters_form_dict = action_type_not_found_parameters.from_dict(action_type_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionValidationFailed.md b/docs/ActionValidationFailed.md deleted file mode 100644 index edae69275..000000000 --- a/docs/ActionValidationFailed.md +++ /dev/null @@ -1,32 +0,0 @@ -# ActionValidationFailed - -The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ActionValidationFailedParameters**](ActionValidationFailedParameters.md) | | - -## Example - -```python -from foundry.models import ActionValidationFailed - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionValidationFailed from a JSON string -action_validation_failed_instance = ActionValidationFailed.from_json(json) -# print the JSON string representation of the object -print(ActionValidationFailed.to_json()) - -# convert the object into a dict -action_validation_failed_dict = action_validation_failed_instance.to_dict() -# create an instance of ActionValidationFailed from a dict -action_validation_failed_form_dict = action_validation_failed.from_dict(action_validation_failed_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ActionValidationFailedParameters.md b/docs/ActionValidationFailedParameters.md deleted file mode 100644 index 4c9692d1e..000000000 --- a/docs/ActionValidationFailedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ActionValidationFailedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_type** | **str** | The name of the action type in the API. To find the API name for your Action Type, use the \`List action types\` endpoint or check the **Ontology Manager**. | - -## Example - -```python -from foundry.models import ActionValidationFailedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ActionValidationFailedParameters from a JSON string -action_validation_failed_parameters_instance = ActionValidationFailedParameters.from_json(json) -# print the JSON string representation of the object -print(ActionValidationFailedParameters.to_json()) - -# convert the object into a dict -action_validation_failed_parameters_dict = action_validation_failed_parameters_instance.to_dict() -# create an instance of ActionValidationFailedParameters from a dict -action_validation_failed_parameters_form_dict = action_validation_failed_parameters.from_dict(action_validation_failed_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AggregationGroupCountExceededLimit.md b/docs/AggregationGroupCountExceededLimit.md deleted file mode 100644 index 6e4a13034..000000000 --- a/docs/AggregationGroupCountExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# AggregationGroupCountExceededLimit - -The number of groups in the aggregations grouping exceeded the allowed limit. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AggregationGroupCountExceededLimitParameters**](AggregationGroupCountExceededLimitParameters.md) | | - -## Example - -```python -from foundry.models import AggregationGroupCountExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of AggregationGroupCountExceededLimit from a JSON string -aggregation_group_count_exceeded_limit_instance = AggregationGroupCountExceededLimit.from_json(json) -# print the JSON string representation of the object -print(AggregationGroupCountExceededLimit.to_json()) - -# convert the object into a dict -aggregation_group_count_exceeded_limit_dict = aggregation_group_count_exceeded_limit_instance.to_dict() -# create an instance of AggregationGroupCountExceededLimit from a dict -aggregation_group_count_exceeded_limit_form_dict = aggregation_group_count_exceeded_limit.from_dict(aggregation_group_count_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AggregationGroupCountExceededLimitParameters.md b/docs/AggregationGroupCountExceededLimitParameters.md deleted file mode 100644 index 0855981ab..000000000 --- a/docs/AggregationGroupCountExceededLimitParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# AggregationGroupCountExceededLimitParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**groups_count** | **int** | | -**groups_limit** | **int** | | - -## Example - -```python -from foundry.models import AggregationGroupCountExceededLimitParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of AggregationGroupCountExceededLimitParameters from a JSON string -aggregation_group_count_exceeded_limit_parameters_instance = AggregationGroupCountExceededLimitParameters.from_json(json) -# print the JSON string representation of the object -print(AggregationGroupCountExceededLimitParameters.to_json()) - -# convert the object into a dict -aggregation_group_count_exceeded_limit_parameters_dict = aggregation_group_count_exceeded_limit_parameters_instance.to_dict() -# create an instance of AggregationGroupCountExceededLimitParameters from a dict -aggregation_group_count_exceeded_limit_parameters_form_dict = aggregation_group_count_exceeded_limit_parameters.from_dict(aggregation_group_count_exceeded_limit_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ApiFeaturePreviewUsageOnly.md b/docs/ApiFeaturePreviewUsageOnly.md deleted file mode 100644 index 221ae10ba..000000000 --- a/docs/ApiFeaturePreviewUsageOnly.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiFeaturePreviewUsageOnly - -This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ApiFeaturePreviewUsageOnly - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiFeaturePreviewUsageOnly from a JSON string -api_feature_preview_usage_only_instance = ApiFeaturePreviewUsageOnly.from_json(json) -# print the JSON string representation of the object -print(ApiFeaturePreviewUsageOnly.to_json()) - -# convert the object into a dict -api_feature_preview_usage_only_dict = api_feature_preview_usage_only_instance.to_dict() -# create an instance of ApiFeaturePreviewUsageOnly from a dict -api_feature_preview_usage_only_form_dict = api_feature_preview_usage_only.from_dict(api_feature_preview_usage_only_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ApiUsageDenied.md b/docs/ApiUsageDenied.md deleted file mode 100644 index 7130698d1..000000000 --- a/docs/ApiUsageDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# ApiUsageDenied - -You are not allowed to use Palantir APIs. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ApiUsageDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of ApiUsageDenied from a JSON string -api_usage_denied_instance = ApiUsageDenied.from_json(json) -# print the JSON string representation of the object -print(ApiUsageDenied.to_json()) - -# convert the object into a dict -api_usage_denied_dict = api_usage_denied_instance.to_dict() -# create an instance of ApiUsageDenied from a dict -api_usage_denied_form_dict = api_usage_denied.from_dict(api_usage_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ApplyActionFailed.md b/docs/ApplyActionFailed.md deleted file mode 100644 index 702495ead..000000000 --- a/docs/ApplyActionFailed.md +++ /dev/null @@ -1,30 +0,0 @@ -# ApplyActionFailed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ApplyActionFailed - -# TODO update the JSON string below -json = "{}" -# create an instance of ApplyActionFailed from a JSON string -apply_action_failed_instance = ApplyActionFailed.from_json(json) -# print the JSON string representation of the object -print(ApplyActionFailed.to_json()) - -# convert the object into a dict -apply_action_failed_dict = apply_action_failed_instance.to_dict() -# create an instance of ApplyActionFailed from a dict -apply_action_failed_form_dict = apply_action_failed.from_dict(apply_action_failed_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ApplyActionMode.md b/docs/ApplyActionMode.md deleted file mode 100644 index c975b2ca6..000000000 --- a/docs/ApplyActionMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApplyActionMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -**VALIDATE_ONLY** | 'VALIDATE_ONLY' | | -**VALIDATE_AND_EXECUTE** | 'VALIDATE_AND_EXECUTE' | | - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ApplyActionRequestOptions.md b/docs/ApplyActionRequestOptions.md deleted file mode 100644 index 3cc0a902f..000000000 --- a/docs/ApplyActionRequestOptions.md +++ /dev/null @@ -1,28 +0,0 @@ -# ApplyActionRequestOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**mode** | [**ApplyActionMode**](ApplyActionMode.md) | | \[optional\] -**return_edits** | [**ReturnEditsMode**](ReturnEditsMode.md) | | \[optional\] - -## Example - -```python -from foundry.models import ApplyActionRequestOptions - -# TODO update the JSON string below -json = "{}" -# create an instance of ApplyActionRequestOptions from a JSON string -apply_action_request_options_instance = ApplyActionRequestOptions.from_json(json) -# print the JSON string representation of the object -print(ApplyActionRequestOptions.to_json()) - -# convert the object into a dict -apply_action_request_options_dict = apply_action_request_options_instance.to_dict() -# create an instance of ApplyActionRequestOptions from a dict -apply_action_request_options_form_dict = apply_action_request_options.from_dict(apply_action_request_options_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AsyncOperationError.md b/docs/AsyncOperationError.md deleted file mode 100644 index ef7d79c54..000000000 --- a/docs/AsyncOperationError.md +++ /dev/null @@ -1,31 +0,0 @@ -# AsyncOperationError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **Dict\[str, object\]** | | \[optional\] -**type** | **str** | | - -## Example - -```python -from foundry.models import AsyncOperationError - -# TODO update the JSON string below -json = "{}" -# create an instance of AsyncOperationError from a JSON string -async_operation_error_instance = AsyncOperationError.from_json(json) -# print the JSON string representation of the object -print(AsyncOperationError.to_json()) - -# convert the object into a dict -async_operation_error_dict = async_operation_error_instance.to_dict() -# create an instance of AsyncOperationError from a dict -async_operation_error_form_dict = async_operation_error.from_dict(async_operation_error_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AttachmentNotFound.md b/docs/AttachmentNotFound.md deleted file mode 100644 index 226119d0c..000000000 --- a/docs/AttachmentNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# AttachmentNotFound - -The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AttachmentNotFoundParameters**](AttachmentNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import AttachmentNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of AttachmentNotFound from a JSON string -attachment_not_found_instance = AttachmentNotFound.from_json(json) -# print the JSON string representation of the object -print(AttachmentNotFound.to_json()) - -# convert the object into a dict -attachment_not_found_dict = attachment_not_found_instance.to_dict() -# create an instance of AttachmentNotFound from a dict -attachment_not_found_form_dict = attachment_not_found.from_dict(attachment_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AttachmentNotFoundParameters.md b/docs/AttachmentNotFoundParameters.md deleted file mode 100644 index e7fb48847..000000000 --- a/docs/AttachmentNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# AttachmentNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**attachment_rid** | **str** | The unique resource identifier of an attachment. | \[optional\] - -## Example - -```python -from foundry.models import AttachmentNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of AttachmentNotFoundParameters from a JSON string -attachment_not_found_parameters_instance = AttachmentNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(AttachmentNotFoundParameters.to_json()) - -# convert the object into a dict -attachment_not_found_parameters_dict = attachment_not_found_parameters_instance.to_dict() -# create an instance of AttachmentNotFoundParameters from a dict -attachment_not_found_parameters_form_dict = attachment_not_found_parameters.from_dict(attachment_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AttachmentSizeExceededLimit.md b/docs/AttachmentSizeExceededLimit.md deleted file mode 100644 index 8992243ae..000000000 --- a/docs/AttachmentSizeExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# AttachmentSizeExceededLimit - -The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AttachmentSizeExceededLimitParameters**](AttachmentSizeExceededLimitParameters.md) | | - -## Example - -```python -from foundry.models import AttachmentSizeExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of AttachmentSizeExceededLimit from a JSON string -attachment_size_exceeded_limit_instance = AttachmentSizeExceededLimit.from_json(json) -# print the JSON string representation of the object -print(AttachmentSizeExceededLimit.to_json()) - -# convert the object into a dict -attachment_size_exceeded_limit_dict = attachment_size_exceeded_limit_instance.to_dict() -# create an instance of AttachmentSizeExceededLimit from a dict -attachment_size_exceeded_limit_form_dict = attachment_size_exceeded_limit.from_dict(attachment_size_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/AttachmentSizeExceededLimitParameters.md b/docs/AttachmentSizeExceededLimitParameters.md deleted file mode 100644 index 3dff4994b..000000000 --- a/docs/AttachmentSizeExceededLimitParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# AttachmentSizeExceededLimitParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**file_limit_bytes** | **str** | | -**file_size_bytes** | **str** | | - -## Example - -```python -from foundry.models import AttachmentSizeExceededLimitParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of AttachmentSizeExceededLimitParameters from a JSON string -attachment_size_exceeded_limit_parameters_instance = AttachmentSizeExceededLimitParameters.from_json(json) -# print the JSON string representation of the object -print(AttachmentSizeExceededLimitParameters.to_json()) - -# convert the object into a dict -attachment_size_exceeded_limit_parameters_dict = attachment_size_exceeded_limit_parameters_instance.to_dict() -# create an instance of AttachmentSizeExceededLimitParameters from a dict -attachment_size_exceeded_limit_parameters_form_dict = attachment_size_exceeded_limit_parameters.from_dict(attachment_size_exceeded_limit_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/BranchAlreadyExists.md b/docs/BranchAlreadyExists.md deleted file mode 100644 index 7e0f59f72..000000000 --- a/docs/BranchAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# BranchAlreadyExists - -The branch cannot be created because a branch with that name already exists. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import BranchAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of BranchAlreadyExists from a JSON string -branch_already_exists_instance = BranchAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(BranchAlreadyExists.to_json()) - -# convert the object into a dict -branch_already_exists_dict = branch_already_exists_instance.to_dict() -# create an instance of BranchAlreadyExists from a dict -branch_already_exists_form_dict = branch_already_exists.from_dict(branch_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/BranchAlreadyExistsParameters.md b/docs/BranchAlreadyExistsParameters.md deleted file mode 100644 index 158092fed..000000000 --- a/docs/BranchAlreadyExistsParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# BranchAlreadyExistsParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_id** | **str** | The identifier (name) of a Branch. Example: \`master\`. | -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | - -## Example - -```python -from foundry.models import BranchAlreadyExistsParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of BranchAlreadyExistsParameters from a JSON string -branch_already_exists_parameters_instance = BranchAlreadyExistsParameters.from_json(json) -# print the JSON string representation of the object -print(BranchAlreadyExistsParameters.to_json()) - -# convert the object into a dict -branch_already_exists_parameters_dict = branch_already_exists_parameters_instance.to_dict() -# create an instance of BranchAlreadyExistsParameters from a dict -branch_already_exists_parameters_form_dict = branch_already_exists_parameters.from_dict(branch_already_exists_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/BranchNotFound.md b/docs/BranchNotFound.md deleted file mode 100644 index df913eb4e..000000000 --- a/docs/BranchNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# BranchNotFound - -The requested branch could not be found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import BranchNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of BranchNotFound from a JSON string -branch_not_found_instance = BranchNotFound.from_json(json) -# print the JSON string representation of the object -print(BranchNotFound.to_json()) - -# convert the object into a dict -branch_not_found_dict = branch_not_found_instance.to_dict() -# create an instance of BranchNotFound from a dict -branch_not_found_form_dict = branch_not_found.from_dict(branch_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ColumnTypesNotSupported.md b/docs/ColumnTypesNotSupported.md deleted file mode 100644 index 80a763a7c..000000000 --- a/docs/ColumnTypesNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# ColumnTypesNotSupported - -The dataset contains column types that are not supported. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ColumnTypesNotSupportedParameters**](ColumnTypesNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import ColumnTypesNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of ColumnTypesNotSupported from a JSON string -column_types_not_supported_instance = ColumnTypesNotSupported.from_json(json) -# print the JSON string representation of the object -print(ColumnTypesNotSupported.to_json()) - -# convert the object into a dict -column_types_not_supported_dict = column_types_not_supported_instance.to_dict() -# create an instance of ColumnTypesNotSupported from a dict -column_types_not_supported_form_dict = column_types_not_supported.from_dict(column_types_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ColumnTypesNotSupportedParameters.md b/docs/ColumnTypesNotSupportedParameters.md deleted file mode 100644 index 42c0d6981..000000000 --- a/docs/ColumnTypesNotSupportedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ColumnTypesNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | - -## Example - -```python -from foundry.models import ColumnTypesNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ColumnTypesNotSupportedParameters from a JSON string -column_types_not_supported_parameters_instance = ColumnTypesNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(ColumnTypesNotSupportedParameters.to_json()) - -# convert the object into a dict -column_types_not_supported_parameters_dict = column_types_not_supported_parameters_instance.to_dict() -# create an instance of ColumnTypesNotSupportedParameters from a dict -column_types_not_supported_parameters_form_dict = column_types_not_supported_parameters.from_dict(column_types_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CommitTransactionPermissionDenied.md b/docs/CommitTransactionPermissionDenied.md deleted file mode 100644 index 33d5be480..000000000 --- a/docs/CommitTransactionPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# CommitTransactionPermissionDenied - -The provided token does not have permission to commit the given treansaction on the given dataset. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AbortTransactionPermissionDeniedParameters**](AbortTransactionPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import CommitTransactionPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of CommitTransactionPermissionDenied from a JSON string -commit_transaction_permission_denied_instance = CommitTransactionPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(CommitTransactionPermissionDenied.to_json()) - -# convert the object into a dict -commit_transaction_permission_denied_dict = commit_transaction_permission_denied_instance.to_dict() -# create an instance of CommitTransactionPermissionDenied from a dict -commit_transaction_permission_denied_form_dict = commit_transaction_permission_denied.from_dict(commit_transaction_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CompositePrimaryKeyNotSupported.md b/docs/CompositePrimaryKeyNotSupported.md deleted file mode 100644 index 37701177e..000000000 --- a/docs/CompositePrimaryKeyNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# CompositePrimaryKeyNotSupported - -Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**CompositePrimaryKeyNotSupportedParameters**](CompositePrimaryKeyNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import CompositePrimaryKeyNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of CompositePrimaryKeyNotSupported from a JSON string -composite_primary_key_not_supported_instance = CompositePrimaryKeyNotSupported.from_json(json) -# print the JSON string representation of the object -print(CompositePrimaryKeyNotSupported.to_json()) - -# convert the object into a dict -composite_primary_key_not_supported_dict = composite_primary_key_not_supported_instance.to_dict() -# create an instance of CompositePrimaryKeyNotSupported from a dict -composite_primary_key_not_supported_form_dict = composite_primary_key_not_supported.from_dict(composite_primary_key_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CompositePrimaryKeyNotSupportedParameters.md b/docs/CompositePrimaryKeyNotSupportedParameters.md deleted file mode 100644 index f4f031701..000000000 --- a/docs/CompositePrimaryKeyNotSupportedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# CompositePrimaryKeyNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**primary_key** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import CompositePrimaryKeyNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of CompositePrimaryKeyNotSupportedParameters from a JSON string -composite_primary_key_not_supported_parameters_instance = CompositePrimaryKeyNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(CompositePrimaryKeyNotSupportedParameters.to_json()) - -# convert the object into a dict -composite_primary_key_not_supported_parameters_dict = composite_primary_key_not_supported_parameters_instance.to_dict() -# create an instance of CompositePrimaryKeyNotSupportedParameters from a dict -composite_primary_key_not_supported_parameters_form_dict = composite_primary_key_not_supported_parameters.from_dict(composite_primary_key_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CreateBranchPermissionDenied.md b/docs/CreateBranchPermissionDenied.md deleted file mode 100644 index 221ae209f..000000000 --- a/docs/CreateBranchPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateBranchPermissionDenied - -The provided token does not have permission to create a branch of this dataset. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import CreateBranchPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateBranchPermissionDenied from a JSON string -create_branch_permission_denied_instance = CreateBranchPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(CreateBranchPermissionDenied.to_json()) - -# convert the object into a dict -create_branch_permission_denied_dict = create_branch_permission_denied_instance.to_dict() -# create an instance of CreateBranchPermissionDenied from a dict -create_branch_permission_denied_form_dict = create_branch_permission_denied.from_dict(create_branch_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CreateDatasetPermissionDenied.md b/docs/CreateDatasetPermissionDenied.md deleted file mode 100644 index fcba37227..000000000 --- a/docs/CreateDatasetPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateDatasetPermissionDenied - -The provided token does not have permission to create a dataset in this folder. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**CreateDatasetPermissionDeniedParameters**](CreateDatasetPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import CreateDatasetPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateDatasetPermissionDenied from a JSON string -create_dataset_permission_denied_instance = CreateDatasetPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(CreateDatasetPermissionDenied.to_json()) - -# convert the object into a dict -create_dataset_permission_denied_dict = create_dataset_permission_denied_instance.to_dict() -# create an instance of CreateDatasetPermissionDenied from a dict -create_dataset_permission_denied_form_dict = create_dataset_permission_denied.from_dict(create_dataset_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CreateDatasetPermissionDeniedParameters.md b/docs/CreateDatasetPermissionDeniedParameters.md deleted file mode 100644 index 71c52f2b5..000000000 --- a/docs/CreateDatasetPermissionDeniedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# CreateDatasetPermissionDeniedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**parent_folder_rid** | **str** | | - -## Example - -```python -from foundry.models import CreateDatasetPermissionDeniedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateDatasetPermissionDeniedParameters from a JSON string -create_dataset_permission_denied_parameters_instance = CreateDatasetPermissionDeniedParameters.from_json(json) -# print the JSON string representation of the object -print(CreateDatasetPermissionDeniedParameters.to_json()) - -# convert the object into a dict -create_dataset_permission_denied_parameters_dict = create_dataset_permission_denied_parameters_instance.to_dict() -# create an instance of CreateDatasetPermissionDeniedParameters from a dict -create_dataset_permission_denied_parameters_form_dict = create_dataset_permission_denied_parameters.from_dict(create_dataset_permission_denied_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/CreateTransactionPermissionDenied.md b/docs/CreateTransactionPermissionDenied.md deleted file mode 100644 index 731589a9c..000000000 --- a/docs/CreateTransactionPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateTransactionPermissionDenied - -The provided token does not have permission to create a transaction on this dataset. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import CreateTransactionPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateTransactionPermissionDenied from a JSON string -create_transaction_permission_denied_instance = CreateTransactionPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(CreateTransactionPermissionDenied.to_json()) - -# convert the object into a dict -create_transaction_permission_denied_dict = create_transaction_permission_denied_instance.to_dict() -# create an instance of CreateTransactionPermissionDenied from a dict -create_transaction_permission_denied_form_dict = create_transaction_permission_denied.from_dict(create_transaction_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DatasetNotFound.md b/docs/DatasetNotFound.md deleted file mode 100644 index 530d20c3c..000000000 --- a/docs/DatasetNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# DatasetNotFound - -The requested dataset could not be found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ColumnTypesNotSupportedParameters**](ColumnTypesNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import DatasetNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of DatasetNotFound from a JSON string -dataset_not_found_instance = DatasetNotFound.from_json(json) -# print the JSON string representation of the object -print(DatasetNotFound.to_json()) - -# convert the object into a dict -dataset_not_found_dict = dataset_not_found_instance.to_dict() -# create an instance of DatasetNotFound from a dict -dataset_not_found_form_dict = dataset_not_found.from_dict(dataset_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DatasetsApiServiceApi.md b/docs/DatasetsApiServiceApi.md index 99f64f134..36498c4b3 100644 --- a/docs/DatasetsApiServiceApi.md +++ b/docs/DatasetsApiServiceApi.md @@ -2,8 +2,6 @@ The official Python library for the Foundry API -All URIs are relative to *http://localhost* - Method | HTTP request | Description ------------- | ------------- | ------------- [**abort_transaction**]() | **POST** /v1/datasets/{datasetRid}/transactions/{transactionRid}/abort | @@ -42,7 +40,7 @@ from foundry.models.transaction import Transaction from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Transaction. transaction_rid = 'ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496' # str | The Resource Identifier (RID) of the Transaction. @@ -101,7 +99,7 @@ from foundry.models.transaction import Transaction from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Transaction. transaction_rid = 'ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496' # str | The Resource Identifier (RID) of the Transaction. @@ -161,7 +159,7 @@ from foundry.models.create_branch_request import CreateBranchRequest from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset on which to create the Branch. create_branch_request = {"branchId":"my-branch"} # CreateBranchRequest | @@ -221,7 +219,7 @@ from foundry.models.dataset import Dataset from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") create_dataset_request = {"name":"My Dataset","parentFolderRid":"ri.foundry.main.folder.bfe58487-4c56-4c58-aba7-25defd6163c4"} # CreateDatasetRequest | @@ -279,7 +277,7 @@ from foundry.models.transaction import Transaction from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset on which to create the Transaction. create_transaction_request = {"transactionType":"SNAPSHOT"} # CreateTransactionRequest | @@ -299,7 +297,7 @@ except Exception as e: ```python import foundry -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") my_transaction = foundry_client.datasets.create_transaction( dataset_rid="...", @@ -358,7 +356,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Branch. branch_id = 'my-branch' # str | The identifier (name) of the Branch. @@ -414,7 +412,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset on which to delete the File. file_path = 'q3-data%2fmy-file.csv' # str | The File path within the Dataset. @@ -474,7 +472,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The RID of the Dataset on which to delete the schema. branch_id = 'branch_id_example' # str | The ID of the Branch on which to delete the schema. (optional) @@ -535,7 +533,7 @@ from foundry.models.branch import Branch from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Branch. branch_id = 'master' # str | The identifier (name) of the Branch. @@ -594,7 +592,7 @@ from foundry.models.dataset import Dataset from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | @@ -650,7 +648,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The Resource Identifier (RID) of the Dataset that contains the File. file_path = 'q3-data%2fmy-file.csv' # str | The File's path within the Dataset. @@ -715,7 +713,7 @@ from foundry.models.file import File from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the File. file_path = 'q3-data%2fmy-file.csv' # str | The File's path within the Dataset. @@ -779,7 +777,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The RID of the Dataset. branch_id = 'branch_id_example' # str | The ID of the Branch. (optional) @@ -843,7 +841,7 @@ from foundry.models.transaction import Transaction from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset that contains the Transaction. transaction_rid = 'ri.foundry.main.transaction.abffc380-ea68-4843-9be1-9f44d2565496' # str | The Resource Identifier (RID) of the Transaction. @@ -902,7 +900,7 @@ from foundry.models.list_branches_response import ListBranchesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da' # str | The Resource Identifier (RID) of the Dataset on which to list Branches. page_size = 56 # int | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) @@ -963,7 +961,7 @@ from foundry.models.list_files_response import ListFilesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The Resource Identifier (RID) of the Dataset on which to list Files. branch_id = 'branch_id_example' # str | The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments. (optional) @@ -986,7 +984,7 @@ except Exception as e: ```python import foundry -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") files = list(foundry_client.datasets.list_files(dataset_rid="...")) @@ -1048,7 +1046,7 @@ import foundry from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The RID of the Dataset on which to put the Schema. body = None # object | @@ -1110,7 +1108,7 @@ from foundry.models.table_export_format import TableExportFormat from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The RID of the Dataset. format = foundry.TableExportFormat() # TableExportFormat | The export format. Must be `ARROW` or `CSV`. @@ -1137,7 +1135,7 @@ import foundry from foundry.models import TableExportFormat from foundry.rest import ApiException -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") try: api_response = foundry_client.datasets.read_table(dataset_rid="...", format="CSV", columns=[...]) @@ -1159,7 +1157,7 @@ from foundry.models import TableExportFormat from foundry.rest import ApiException import pyarrow as pa -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") try: api_response = foundry_client.datasets.read_table(dataset_rid="...", format="ARROW", columns=[...]) @@ -1239,7 +1237,7 @@ from foundry.models.transaction_type import TransactionType from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") dataset_rid = 'dataset_rid_example' # str | The Resource Identifier (RID) of the Dataset on which to upload the File. file_path = 'q3-data%2fmy-file.csv' # str | The File's path within the Dataset. diff --git a/docs/DeleteBranchPermissionDenied.md b/docs/DeleteBranchPermissionDenied.md deleted file mode 100644 index 2e8f6e952..000000000 --- a/docs/DeleteBranchPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# DeleteBranchPermissionDenied - -The provided token does not have permission to delete the given branch from this dataset. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import DeleteBranchPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteBranchPermissionDenied from a JSON string -delete_branch_permission_denied_instance = DeleteBranchPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(DeleteBranchPermissionDenied.to_json()) - -# convert the object into a dict -delete_branch_permission_denied_dict = delete_branch_permission_denied_instance.to_dict() -# create an instance of DeleteBranchPermissionDenied from a dict -delete_branch_permission_denied_form_dict = delete_branch_permission_denied.from_dict(delete_branch_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DeleteSchemaPermissionDenied.md b/docs/DeleteSchemaPermissionDenied.md deleted file mode 100644 index 17625a565..000000000 --- a/docs/DeleteSchemaPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# DeleteSchemaPermissionDenied - -todo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DeleteSchemaPermissionDeniedParameters**](DeleteSchemaPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import DeleteSchemaPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteSchemaPermissionDenied from a JSON string -delete_schema_permission_denied_instance = DeleteSchemaPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(DeleteSchemaPermissionDenied.to_json()) - -# convert the object into a dict -delete_schema_permission_denied_dict = delete_schema_permission_denied_instance.to_dict() -# create an instance of DeleteSchemaPermissionDenied from a dict -delete_schema_permission_denied_form_dict = delete_schema_permission_denied.from_dict(delete_schema_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DeleteSchemaPermissionDeniedParameters.md b/docs/DeleteSchemaPermissionDeniedParameters.md deleted file mode 100644 index 14663d6aa..000000000 --- a/docs/DeleteSchemaPermissionDeniedParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# DeleteSchemaPermissionDeniedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_id** | **str** | The identifier (name) of a Branch. Example: \`master\`. | -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | \[optional\] - -## Example - -```python -from foundry.models import DeleteSchemaPermissionDeniedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of DeleteSchemaPermissionDeniedParameters from a JSON string -delete_schema_permission_denied_parameters_instance = DeleteSchemaPermissionDeniedParameters.from_json(json) -# print the JSON string representation of the object -print(DeleteSchemaPermissionDeniedParameters.to_json()) - -# convert the object into a dict -delete_schema_permission_denied_parameters_dict = delete_schema_permission_denied_parameters_instance.to_dict() -# create an instance of DeleteSchemaPermissionDeniedParameters from a dict -delete_schema_permission_denied_parameters_form_dict = delete_schema_permission_denied_parameters.from_dict(delete_schema_permission_denied_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DeploymentNotAvailable.md b/docs/DeploymentNotAvailable.md deleted file mode 100644 index 1e3c2f3f4..000000000 --- a/docs/DeploymentNotAvailable.md +++ /dev/null @@ -1,32 +0,0 @@ -# DeploymentNotAvailable - -The requested model deployment does not have a model deployed. It may be disabled or failed. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DeploymentNotAvailableParameters**](DeploymentNotAvailableParameters.md) | | - -## Example - -```python -from foundry.models import DeploymentNotAvailable - -# TODO update the JSON string below -json = "{}" -# create an instance of DeploymentNotAvailable from a JSON string -deployment_not_available_instance = DeploymentNotAvailable.from_json(json) -# print the JSON string representation of the object -print(DeploymentNotAvailable.to_json()) - -# convert the object into a dict -deployment_not_available_dict = deployment_not_available_instance.to_dict() -# create an instance of DeploymentNotAvailable from a dict -deployment_not_available_form_dict = deployment_not_available.from_dict(deployment_not_available_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DeploymentNotAvailableParameters.md b/docs/DeploymentNotAvailableParameters.md deleted file mode 100644 index 33361dc1c..000000000 --- a/docs/DeploymentNotAvailableParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# DeploymentNotAvailableParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deployment_api_name** | **str** | | \[optional\] -**ontology_api_name** | **str** | | \[optional\] - -## Example - -```python -from foundry.models import DeploymentNotAvailableParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of DeploymentNotAvailableParameters from a JSON string -deployment_not_available_parameters_instance = DeploymentNotAvailableParameters.from_json(json) -# print the JSON string representation of the object -print(DeploymentNotAvailableParameters.to_json()) - -# convert the object into a dict -deployment_not_available_parameters_dict = deployment_not_available_parameters_instance.to_dict() -# create an instance of DeploymentNotAvailableParameters from a dict -deployment_not_available_parameters_form_dict = deployment_not_available_parameters.from_dict(deployment_not_available_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DeploymentNotFound.md b/docs/DeploymentNotFound.md deleted file mode 100644 index 73b631006..000000000 --- a/docs/DeploymentNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# DeploymentNotFound - -The requested model deployment is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DeploymentNotAvailableParameters**](DeploymentNotAvailableParameters.md) | | - -## Example - -```python -from foundry.models import DeploymentNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of DeploymentNotFound from a JSON string -deployment_not_found_instance = DeploymentNotFound.from_json(json) -# print the JSON string representation of the object -print(DeploymentNotFound.to_json()) - -# convert the object into a dict -deployment_not_found_dict = deployment_not_found_instance.to_dict() -# create an instance of DeploymentNotFound from a dict -deployment_not_found_form_dict = deployment_not_found.from_dict(deployment_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DistanceUnit.md b/docs/DistanceUnit.md deleted file mode 100644 index 07117447e..000000000 --- a/docs/DistanceUnit.md +++ /dev/null @@ -1,18 +0,0 @@ -# DistanceUnit - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -**MILLIMETERS** | 'MILLIMETERS' | | -**CENTIMETERS** | 'CENTIMETERS' | | -**METERS** | 'METERS' | | -**KILOMETERS** | 'KILOMETERS' | | -**INCHES** | 'INCHES' | | -**FEET** | 'FEET' | | -**YARDS** | 'YARDS' | | -**MILES** | 'MILES' | | -**NAUTICAL_MILES** | 'NAUTICAL_MILES' | | - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DuplicateOrderBy.md b/docs/DuplicateOrderBy.md deleted file mode 100644 index d00ac6c46..000000000 --- a/docs/DuplicateOrderBy.md +++ /dev/null @@ -1,32 +0,0 @@ -# DuplicateOrderBy - -The requested sort order includes duplicate properties. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DuplicateOrderByParameters**](DuplicateOrderByParameters.md) | | - -## Example - -```python -from foundry.models import DuplicateOrderBy - -# TODO update the JSON string below -json = "{}" -# create an instance of DuplicateOrderBy from a JSON string -duplicate_order_by_instance = DuplicateOrderBy.from_json(json) -# print the JSON string representation of the object -print(DuplicateOrderBy.to_json()) - -# convert the object into a dict -duplicate_order_by_dict = duplicate_order_by_instance.to_dict() -# create an instance of DuplicateOrderBy from a dict -duplicate_order_by_form_dict = duplicate_order_by.from_dict(duplicate_order_by_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/DuplicateOrderByParameters.md b/docs/DuplicateOrderByParameters.md deleted file mode 100644 index a9f67d28c..000000000 --- a/docs/DuplicateOrderByParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# DuplicateOrderByParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**properties** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import DuplicateOrderByParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of DuplicateOrderByParameters from a JSON string -duplicate_order_by_parameters_instance = DuplicateOrderByParameters.from_json(json) -# print the JSON string representation of the object -print(DuplicateOrderByParameters.to_json()) - -# convert the object into a dict -duplicate_order_by_parameters_dict = duplicate_order_by_parameters_instance.to_dict() -# create an instance of DuplicateOrderByParameters from a dict -duplicate_order_by_parameters_form_dict = duplicate_order_by_parameters.from_dict(duplicate_order_by_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/EditObjectPermissionDenied.md b/docs/EditObjectPermissionDenied.md deleted file mode 100644 index 03a0694c8..000000000 --- a/docs/EditObjectPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# EditObjectPermissionDenied - -The user does not have permission to edit this `ObjectType`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import EditObjectPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of EditObjectPermissionDenied from a JSON string -edit_object_permission_denied_instance = EditObjectPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(EditObjectPermissionDenied.to_json()) - -# convert the object into a dict -edit_object_permission_denied_dict = edit_object_permission_denied_instance.to_dict() -# create an instance of EditObjectPermissionDenied from a dict -edit_object_permission_denied_form_dict = edit_object_permission_denied.from_dict(edit_object_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileAlreadyExists.md b/docs/FileAlreadyExists.md deleted file mode 100644 index b7d5b230f..000000000 --- a/docs/FileAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# FileAlreadyExists - -The given file path already exists in the dataset and transaction. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FileAlreadyExistsParameters**](FileAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import FileAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of FileAlreadyExists from a JSON string -file_already_exists_instance = FileAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(FileAlreadyExists.to_json()) - -# convert the object into a dict -file_already_exists_dict = file_already_exists_instance.to_dict() -# create an instance of FileAlreadyExists from a dict -file_already_exists_form_dict = file_already_exists.from_dict(file_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileAlreadyExistsParameters.md b/docs/FileAlreadyExistsParameters.md deleted file mode 100644 index 597766e60..000000000 --- a/docs/FileAlreadyExistsParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# FileAlreadyExistsParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**path** | **str** | The path to a File within Foundry. Examples: \`my-file.txt\`, \`path/to/my-file.jpg\`, \`dataframe.snappy.parquet\`. | -**transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | - -## Example - -```python -from foundry.models import FileAlreadyExistsParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FileAlreadyExistsParameters from a JSON string -file_already_exists_parameters_instance = FileAlreadyExistsParameters.from_json(json) -# print the JSON string representation of the object -print(FileAlreadyExistsParameters.to_json()) - -# convert the object into a dict -file_already_exists_parameters_dict = file_already_exists_parameters_instance.to_dict() -# create an instance of FileAlreadyExistsParameters from a dict -file_already_exists_parameters_form_dict = file_already_exists_parameters.from_dict(file_already_exists_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileNotFoundOnBranch.md b/docs/FileNotFoundOnBranch.md deleted file mode 100644 index 0bd8c0a1d..000000000 --- a/docs/FileNotFoundOnBranch.md +++ /dev/null @@ -1,32 +0,0 @@ -# FileNotFoundOnBranch - -The requested file could not be found on the given branch, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FileNotFoundOnBranchParameters**](FileNotFoundOnBranchParameters.md) | | - -## Example - -```python -from foundry.models import FileNotFoundOnBranch - -# TODO update the JSON string below -json = "{}" -# create an instance of FileNotFoundOnBranch from a JSON string -file_not_found_on_branch_instance = FileNotFoundOnBranch.from_json(json) -# print the JSON string representation of the object -print(FileNotFoundOnBranch.to_json()) - -# convert the object into a dict -file_not_found_on_branch_dict = file_not_found_on_branch_instance.to_dict() -# create an instance of FileNotFoundOnBranch from a dict -file_not_found_on_branch_form_dict = file_not_found_on_branch.from_dict(file_not_found_on_branch_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileNotFoundOnBranchParameters.md b/docs/FileNotFoundOnBranchParameters.md deleted file mode 100644 index b0e759769..000000000 --- a/docs/FileNotFoundOnBranchParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# FileNotFoundOnBranchParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_id** | **str** | The identifier (name) of a Branch. Example: \`master\`. | -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**path** | **str** | The path to a File within Foundry. Examples: \`my-file.txt\`, \`path/to/my-file.jpg\`, \`dataframe.snappy.parquet\`. | - -## Example - -```python -from foundry.models import FileNotFoundOnBranchParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FileNotFoundOnBranchParameters from a JSON string -file_not_found_on_branch_parameters_instance = FileNotFoundOnBranchParameters.from_json(json) -# print the JSON string representation of the object -print(FileNotFoundOnBranchParameters.to_json()) - -# convert the object into a dict -file_not_found_on_branch_parameters_dict = file_not_found_on_branch_parameters_instance.to_dict() -# create an instance of FileNotFoundOnBranchParameters from a dict -file_not_found_on_branch_parameters_form_dict = file_not_found_on_branch_parameters.from_dict(file_not_found_on_branch_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileNotFoundOnTransactionRange.md b/docs/FileNotFoundOnTransactionRange.md deleted file mode 100644 index 0cd7b787c..000000000 --- a/docs/FileNotFoundOnTransactionRange.md +++ /dev/null @@ -1,32 +0,0 @@ -# FileNotFoundOnTransactionRange - -The requested file could not be found on the given transaction range, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FileNotFoundOnTransactionRangeParameters**](FileNotFoundOnTransactionRangeParameters.md) | | - -## Example - -```python -from foundry.models import FileNotFoundOnTransactionRange - -# TODO update the JSON string below -json = "{}" -# create an instance of FileNotFoundOnTransactionRange from a JSON string -file_not_found_on_transaction_range_instance = FileNotFoundOnTransactionRange.from_json(json) -# print the JSON string representation of the object -print(FileNotFoundOnTransactionRange.to_json()) - -# convert the object into a dict -file_not_found_on_transaction_range_dict = file_not_found_on_transaction_range_instance.to_dict() -# create an instance of FileNotFoundOnTransactionRange from a dict -file_not_found_on_transaction_range_form_dict = file_not_found_on_transaction_range.from_dict(file_not_found_on_transaction_range_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FileNotFoundOnTransactionRangeParameters.md b/docs/FileNotFoundOnTransactionRangeParameters.md deleted file mode 100644 index f8fa2d68f..000000000 --- a/docs/FileNotFoundOnTransactionRangeParameters.md +++ /dev/null @@ -1,30 +0,0 @@ -# FileNotFoundOnTransactionRangeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**end_transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | -**path** | **str** | The path to a File within Foundry. Examples: \`my-file.txt\`, \`path/to/my-file.jpg\`, \`dataframe.snappy.parquet\`. | -**start_transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | \[optional\] - -## Example - -```python -from foundry.models import FileNotFoundOnTransactionRangeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FileNotFoundOnTransactionRangeParameters from a JSON string -file_not_found_on_transaction_range_parameters_instance = FileNotFoundOnTransactionRangeParameters.from_json(json) -# print the JSON string representation of the object -print(FileNotFoundOnTransactionRangeParameters.to_json()) - -# convert the object into a dict -file_not_found_on_transaction_range_parameters_dict = file_not_found_on_transaction_range_parameters_instance.to_dict() -# create an instance of FileNotFoundOnTransactionRangeParameters from a dict -file_not_found_on_transaction_range_parameters_form_dict = file_not_found_on_transaction_range_parameters.from_dict(file_not_found_on_transaction_range_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FolderNotFound.md b/docs/FolderNotFound.md deleted file mode 100644 index 5aee257e6..000000000 --- a/docs/FolderNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# FolderNotFound - -The requested folder could not be found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FolderNotFoundParameters**](FolderNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import FolderNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderNotFound from a JSON string -folder_not_found_instance = FolderNotFound.from_json(json) -# print the JSON string representation of the object -print(FolderNotFound.to_json()) - -# convert the object into a dict -folder_not_found_dict = folder_not_found_instance.to_dict() -# create an instance of FolderNotFound from a dict -folder_not_found_form_dict = folder_not_found.from_dict(folder_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FolderNotFoundParameters.md b/docs/FolderNotFoundParameters.md deleted file mode 100644 index b87ddcc74..000000000 --- a/docs/FolderNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# FolderNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**folder_rid** | **str** | | - -## Example - -```python -from foundry.models import FolderNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderNotFoundParameters from a JSON string -folder_not_found_parameters_instance = FolderNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(FolderNotFoundParameters.to_json()) - -# convert the object into a dict -folder_not_found_parameters_dict = folder_not_found_parameters_instance.to_dict() -# create an instance of FolderNotFoundParameters from a dict -folder_not_found_parameters_form_dict = folder_not_found_parameters.from_dict(folder_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionEncounteredUserFacingError.md b/docs/FunctionEncounteredUserFacingError.md deleted file mode 100644 index 504147fcb..000000000 --- a/docs/FunctionEncounteredUserFacingError.md +++ /dev/null @@ -1,32 +0,0 @@ -# FunctionEncounteredUserFacingError - -The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionEncounteredUserFacingErrorParameters**](FunctionEncounteredUserFacingErrorParameters.md) | | - -## Example - -```python -from foundry.models import FunctionEncounteredUserFacingError - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionEncounteredUserFacingError from a JSON string -function_encountered_user_facing_error_instance = FunctionEncounteredUserFacingError.from_json(json) -# print the JSON string representation of the object -print(FunctionEncounteredUserFacingError.to_json()) - -# convert the object into a dict -function_encountered_user_facing_error_dict = function_encountered_user_facing_error_instance.to_dict() -# create an instance of FunctionEncounteredUserFacingError from a dict -function_encountered_user_facing_error_form_dict = function_encountered_user_facing_error.from_dict(function_encountered_user_facing_error_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionEncounteredUserFacingErrorParameters.md b/docs/FunctionEncounteredUserFacingErrorParameters.md deleted file mode 100644 index 9c6e607f6..000000000 --- a/docs/FunctionEncounteredUserFacingErrorParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# FunctionEncounteredUserFacingErrorParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_rid** | **str** | The unique resource identifier of a Function, useful for interacting with other Foundry APIs. | -**function_version** | **str** | The version of the given Function, written \`\.\.\-\\`, where \`-\\` is optional. Examples: \`1.2.3\`, \`1.2.3-rc1\`. | -**message** | **str** | | - -## Example - -```python -from foundry.models import FunctionEncounteredUserFacingErrorParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionEncounteredUserFacingErrorParameters from a JSON string -function_encountered_user_facing_error_parameters_instance = FunctionEncounteredUserFacingErrorParameters.from_json(json) -# print the JSON string representation of the object -print(FunctionEncounteredUserFacingErrorParameters.to_json()) - -# convert the object into a dict -function_encountered_user_facing_error_parameters_dict = function_encountered_user_facing_error_parameters_instance.to_dict() -# create an instance of FunctionEncounteredUserFacingErrorParameters from a dict -function_encountered_user_facing_error_parameters_form_dict = function_encountered_user_facing_error_parameters.from_dict(function_encountered_user_facing_error_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionExecutionFailed.md b/docs/FunctionExecutionFailed.md deleted file mode 100644 index 5446bfc89..000000000 --- a/docs/FunctionExecutionFailed.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionExecutionFailed - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionExecutionFailedParameters**](FunctionExecutionFailedParameters.md) | | - -## Example - -```python -from foundry.models import FunctionExecutionFailed - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionExecutionFailed from a JSON string -function_execution_failed_instance = FunctionExecutionFailed.from_json(json) -# print the JSON string representation of the object -print(FunctionExecutionFailed.to_json()) - -# convert the object into a dict -function_execution_failed_dict = function_execution_failed_instance.to_dict() -# create an instance of FunctionExecutionFailed from a dict -function_execution_failed_form_dict = function_execution_failed.from_dict(function_execution_failed_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionExecutionFailedParameters.md b/docs/FunctionExecutionFailedParameters.md deleted file mode 100644 index c67c1dac6..000000000 --- a/docs/FunctionExecutionFailedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# FunctionExecutionFailedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_rid** | **str** | The unique resource identifier of a Function, useful for interacting with other Foundry APIs. | -**function_version** | **str** | The version of the given Function, written \`\.\.\-\\`, where \`-\\` is optional. Examples: \`1.2.3\`, \`1.2.3-rc1\`. | - -## Example - -```python -from foundry.models import FunctionExecutionFailedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionExecutionFailedParameters from a JSON string -function_execution_failed_parameters_instance = FunctionExecutionFailedParameters.from_json(json) -# print the JSON string representation of the object -print(FunctionExecutionFailedParameters.to_json()) - -# convert the object into a dict -function_execution_failed_parameters_dict = function_execution_failed_parameters_instance.to_dict() -# create an instance of FunctionExecutionFailedParameters from a dict -function_execution_failed_parameters_form_dict = function_execution_failed_parameters.from_dict(function_execution_failed_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionExecutionTimedOut.md b/docs/FunctionExecutionTimedOut.md deleted file mode 100644 index 5454d1401..000000000 --- a/docs/FunctionExecutionTimedOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionExecutionTimedOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionExecutionFailedParameters**](FunctionExecutionFailedParameters.md) | | - -## Example - -```python -from foundry.models import FunctionExecutionTimedOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionExecutionTimedOut from a JSON string -function_execution_timed_out_instance = FunctionExecutionTimedOut.from_json(json) -# print the JSON string representation of the object -print(FunctionExecutionTimedOut.to_json()) - -# convert the object into a dict -function_execution_timed_out_dict = function_execution_timed_out_instance.to_dict() -# create an instance of FunctionExecutionTimedOut from a dict -function_execution_timed_out_form_dict = function_execution_timed_out.from_dict(function_execution_timed_out_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/FunctionInvalidInput.md b/docs/FunctionInvalidInput.md deleted file mode 100644 index e2fdaeb11..000000000 --- a/docs/FunctionInvalidInput.md +++ /dev/null @@ -1,30 +0,0 @@ -# FunctionInvalidInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionExecutionFailedParameters**](FunctionExecutionFailedParameters.md) | | - -## Example - -```python -from foundry.models import FunctionInvalidInput - -# TODO update the JSON string below -json = "{}" -# create an instance of FunctionInvalidInput from a JSON string -function_invalid_input_instance = FunctionInvalidInput.from_json(json) -# print the JSON string representation of the object -print(FunctionInvalidInput.to_json()) - -# convert the object into a dict -function_invalid_input_dict = function_invalid_input_instance.to_dict() -# create an instance of FunctionInvalidInput from a dict -function_invalid_input_form_dict = function_invalid_input.from_dict(function_invalid_input_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidAggregationRange.md b/docs/InvalidAggregationRange.md deleted file mode 100644 index 0b353ba1b..000000000 --- a/docs/InvalidAggregationRange.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidAggregationRange - -Aggregation range should include one lt or lte and one gt or gte. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import InvalidAggregationRange - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidAggregationRange from a JSON string -invalid_aggregation_range_instance = InvalidAggregationRange.from_json(json) -# print the JSON string representation of the object -print(InvalidAggregationRange.to_json()) - -# convert the object into a dict -invalid_aggregation_range_dict = invalid_aggregation_range_instance.to_dict() -# create an instance of InvalidAggregationRange from a dict -invalid_aggregation_range_form_dict = invalid_aggregation_range.from_dict(invalid_aggregation_range_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidAggregationRangePropertyType.md b/docs/InvalidAggregationRangePropertyType.md deleted file mode 100644 index ca7a788d1..000000000 --- a/docs/InvalidAggregationRangePropertyType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidAggregationRangePropertyType - -Range group by is not supported by property type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidAggregationRangePropertyTypeParameters**](InvalidAggregationRangePropertyTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidAggregationRangePropertyType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidAggregationRangePropertyType from a JSON string -invalid_aggregation_range_property_type_instance = InvalidAggregationRangePropertyType.from_json(json) -# print the JSON string representation of the object -print(InvalidAggregationRangePropertyType.to_json()) - -# convert the object into a dict -invalid_aggregation_range_property_type_dict = invalid_aggregation_range_property_type_instance.to_dict() -# create an instance of InvalidAggregationRangePropertyType from a dict -invalid_aggregation_range_property_type_form_dict = invalid_aggregation_range_property_type.from_dict(invalid_aggregation_range_property_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidAggregationRangePropertyTypeParameters.md b/docs/InvalidAggregationRangePropertyTypeParameters.md deleted file mode 100644 index 10efab4ed..000000000 --- a/docs/InvalidAggregationRangePropertyTypeParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# InvalidAggregationRangePropertyTypeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | - -## Example - -```python -from foundry.models import InvalidAggregationRangePropertyTypeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidAggregationRangePropertyTypeParameters from a JSON string -invalid_aggregation_range_property_type_parameters_instance = InvalidAggregationRangePropertyTypeParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidAggregationRangePropertyTypeParameters.to_json()) - -# convert the object into a dict -invalid_aggregation_range_property_type_parameters_dict = invalid_aggregation_range_property_type_parameters_instance.to_dict() -# create an instance of InvalidAggregationRangePropertyTypeParameters from a dict -invalid_aggregation_range_property_type_parameters_form_dict = invalid_aggregation_range_property_type_parameters.from_dict(invalid_aggregation_range_property_type_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidAggregationRangeValue.md b/docs/InvalidAggregationRangeValue.md deleted file mode 100644 index 82b18d34c..000000000 --- a/docs/InvalidAggregationRangeValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidAggregationRangeValue - -Aggregation value does not conform to the expected underlying type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidAggregationRangePropertyTypeParameters**](InvalidAggregationRangePropertyTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidAggregationRangeValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidAggregationRangeValue from a JSON string -invalid_aggregation_range_value_instance = InvalidAggregationRangeValue.from_json(json) -# print the JSON string representation of the object -print(InvalidAggregationRangeValue.to_json()) - -# convert the object into a dict -invalid_aggregation_range_value_dict = invalid_aggregation_range_value_instance.to_dict() -# create an instance of InvalidAggregationRangeValue from a dict -invalid_aggregation_range_value_form_dict = invalid_aggregation_range_value.from_dict(invalid_aggregation_range_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidApplyActionOptionCombination.md b/docs/InvalidApplyActionOptionCombination.md deleted file mode 100644 index 2808c78e6..000000000 --- a/docs/InvalidApplyActionOptionCombination.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidApplyActionOptionCombination - -The given options are individually valid but cannot be used in the given combination. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidApplyActionOptionCombinationParameters**](InvalidApplyActionOptionCombinationParameters.md) | | - -## Example - -```python -from foundry.models import InvalidApplyActionOptionCombination - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidApplyActionOptionCombination from a JSON string -invalid_apply_action_option_combination_instance = InvalidApplyActionOptionCombination.from_json(json) -# print the JSON string representation of the object -print(InvalidApplyActionOptionCombination.to_json()) - -# convert the object into a dict -invalid_apply_action_option_combination_dict = invalid_apply_action_option_combination_instance.to_dict() -# create an instance of InvalidApplyActionOptionCombination from a dict -invalid_apply_action_option_combination_form_dict = invalid_apply_action_option_combination.from_dict(invalid_apply_action_option_combination_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidApplyActionOptionCombinationParameters.md b/docs/InvalidApplyActionOptionCombinationParameters.md deleted file mode 100644 index ee8826ecf..000000000 --- a/docs/InvalidApplyActionOptionCombinationParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidApplyActionOptionCombinationParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invalid_combination** | [**ApplyActionRequestOptions**](ApplyActionRequestOptions.md) | | \[optional\] - -## Example - -```python -from foundry.models import InvalidApplyActionOptionCombinationParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidApplyActionOptionCombinationParameters from a JSON string -invalid_apply_action_option_combination_parameters_instance = InvalidApplyActionOptionCombinationParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidApplyActionOptionCombinationParameters.to_json()) - -# convert the object into a dict -invalid_apply_action_option_combination_parameters_dict = invalid_apply_action_option_combination_parameters_instance.to_dict() -# create an instance of InvalidApplyActionOptionCombinationParameters from a dict -invalid_apply_action_option_combination_parameters_form_dict = invalid_apply_action_option_combination_parameters.from_dict(invalid_apply_action_option_combination_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidBranchId.md b/docs/InvalidBranchId.md deleted file mode 100644 index 0b0e247fb..000000000 --- a/docs/InvalidBranchId.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidBranchId - -The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidBranchIdParameters**](InvalidBranchIdParameters.md) | | - -## Example - -```python -from foundry.models import InvalidBranchId - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidBranchId from a JSON string -invalid_branch_id_instance = InvalidBranchId.from_json(json) -# print the JSON string representation of the object -print(InvalidBranchId.to_json()) - -# convert the object into a dict -invalid_branch_id_dict = invalid_branch_id_instance.to_dict() -# create an instance of InvalidBranchId from a dict -invalid_branch_id_form_dict = invalid_branch_id.from_dict(invalid_branch_id_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidBranchIdParameters.md b/docs/InvalidBranchIdParameters.md deleted file mode 100644 index 8ca05178a..000000000 --- a/docs/InvalidBranchIdParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidBranchIdParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**branch_id** | **str** | The identifier (name) of a Branch. Example: \`master\`. | - -## Example - -```python -from foundry.models import InvalidBranchIdParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidBranchIdParameters from a JSON string -invalid_branch_id_parameters_instance = InvalidBranchIdParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidBranchIdParameters.to_json()) - -# convert the object into a dict -invalid_branch_id_parameters_dict = invalid_branch_id_parameters_instance.to_dict() -# create an instance of InvalidBranchIdParameters from a dict -invalid_branch_id_parameters_form_dict = invalid_branch_id_parameters.from_dict(invalid_branch_id_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidContentLength.md b/docs/InvalidContentLength.md deleted file mode 100644 index cad250f9c..000000000 --- a/docs/InvalidContentLength.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidContentLength - -A `Content-Length` header is required for all uploads, but was missing or invalid. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import InvalidContentLength - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidContentLength from a JSON string -invalid_content_length_instance = InvalidContentLength.from_json(json) -# print the JSON string representation of the object -print(InvalidContentLength.to_json()) - -# convert the object into a dict -invalid_content_length_dict = invalid_content_length_instance.to_dict() -# create an instance of InvalidContentLength from a dict -invalid_content_length_form_dict = invalid_content_length.from_dict(invalid_content_length_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidContentType.md b/docs/InvalidContentType.md deleted file mode 100644 index b7729dd34..000000000 --- a/docs/InvalidContentType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidContentType - -The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import InvalidContentType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidContentType from a JSON string -invalid_content_type_instance = InvalidContentType.from_json(json) -# print the JSON string representation of the object -print(InvalidContentType.to_json()) - -# convert the object into a dict -invalid_content_type_dict = invalid_content_type_instance.to_dict() -# create an instance of InvalidContentType from a dict -invalid_content_type_form_dict = invalid_content_type.from_dict(invalid_content_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidDurationGroupByPropertyType.md b/docs/InvalidDurationGroupByPropertyType.md deleted file mode 100644 index dcdb024db..000000000 --- a/docs/InvalidDurationGroupByPropertyType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidDurationGroupByPropertyType - -Invalid property type for duration groupBy. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidAggregationRangePropertyTypeParameters**](InvalidAggregationRangePropertyTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidDurationGroupByPropertyType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidDurationGroupByPropertyType from a JSON string -invalid_duration_group_by_property_type_instance = InvalidDurationGroupByPropertyType.from_json(json) -# print the JSON string representation of the object -print(InvalidDurationGroupByPropertyType.to_json()) - -# convert the object into a dict -invalid_duration_group_by_property_type_dict = invalid_duration_group_by_property_type_instance.to_dict() -# create an instance of InvalidDurationGroupByPropertyType from a dict -invalid_duration_group_by_property_type_form_dict = invalid_duration_group_by_property_type.from_dict(invalid_duration_group_by_property_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidDurationGroupByValue.md b/docs/InvalidDurationGroupByValue.md deleted file mode 100644 index 860ce1496..000000000 --- a/docs/InvalidDurationGroupByValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidDurationGroupByValue - -Duration groupBy value is invalid. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import InvalidDurationGroupByValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidDurationGroupByValue from a JSON string -invalid_duration_group_by_value_instance = InvalidDurationGroupByValue.from_json(json) -# print the JSON string representation of the object -print(InvalidDurationGroupByValue.to_json()) - -# convert the object into a dict -invalid_duration_group_by_value_dict = invalid_duration_group_by_value_instance.to_dict() -# create an instance of InvalidDurationGroupByValue from a dict -invalid_duration_group_by_value_form_dict = invalid_duration_group_by_value.from_dict(invalid_duration_group_by_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidFields.md b/docs/InvalidFields.md deleted file mode 100644 index 4ecb9f5c4..000000000 --- a/docs/InvalidFields.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidFields - -TBD - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidFieldsParameters**](InvalidFieldsParameters.md) | | - -## Example - -```python -from foundry.models import InvalidFields - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidFields from a JSON string -invalid_fields_instance = InvalidFields.from_json(json) -# print the JSON string representation of the object -print(InvalidFields.to_json()) - -# convert the object into a dict -invalid_fields_dict = invalid_fields_instance.to_dict() -# create an instance of InvalidFields from a dict -invalid_fields_form_dict = invalid_fields.from_dict(invalid_fields_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidFieldsParameters.md b/docs/InvalidFieldsParameters.md deleted file mode 100644 index 0b2ce4961..000000000 --- a/docs/InvalidFieldsParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidFieldsParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**properties** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import InvalidFieldsParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidFieldsParameters from a JSON string -invalid_fields_parameters_instance = InvalidFieldsParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidFieldsParameters.to_json()) - -# convert the object into a dict -invalid_fields_parameters_dict = invalid_fields_parameters_instance.to_dict() -# create an instance of InvalidFieldsParameters from a dict -invalid_fields_parameters_form_dict = invalid_fields_parameters.from_dict(invalid_fields_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidGroupId.md b/docs/InvalidGroupId.md deleted file mode 100644 index fb7de44c7..000000000 --- a/docs/InvalidGroupId.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidGroupId - -The provided value for a group id must be a UUID. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidGroupIdParameters**](InvalidGroupIdParameters.md) | | - -## Example - -```python -from foundry.models import InvalidGroupId - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidGroupId from a JSON string -invalid_group_id_instance = InvalidGroupId.from_json(json) -# print the JSON string representation of the object -print(InvalidGroupId.to_json()) - -# convert the object into a dict -invalid_group_id_dict = invalid_group_id_instance.to_dict() -# create an instance of InvalidGroupId from a dict -invalid_group_id_form_dict = invalid_group_id.from_dict(invalid_group_id_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidGroupIdParameters.md b/docs/InvalidGroupIdParameters.md deleted file mode 100644 index e552d948d..000000000 --- a/docs/InvalidGroupIdParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidGroupIdParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**group_id** | **str** | | - -## Example - -```python -from foundry.models import InvalidGroupIdParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidGroupIdParameters from a JSON string -invalid_group_id_parameters_instance = InvalidGroupIdParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidGroupIdParameters.to_json()) - -# convert the object into a dict -invalid_group_id_parameters_dict = invalid_group_id_parameters_instance.to_dict() -# create an instance of InvalidGroupIdParameters from a dict -invalid_group_id_parameters_form_dict = invalid_group_id_parameters.from_dict(invalid_group_id_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPageSize.md b/docs/InvalidPageSize.md deleted file mode 100644 index f0719de68..000000000 --- a/docs/InvalidPageSize.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPageSize - -The provided page size was zero or negative. Page sizes must be greater than zero. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPageSizeParameters**](InvalidPageSizeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPageSize - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPageSize from a JSON string -invalid_page_size_instance = InvalidPageSize.from_json(json) -# print the JSON string representation of the object -print(InvalidPageSize.to_json()) - -# convert the object into a dict -invalid_page_size_dict = invalid_page_size_instance.to_dict() -# create an instance of InvalidPageSize from a dict -invalid_page_size_form_dict = invalid_page_size.from_dict(invalid_page_size_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPageSizeParameters.md b/docs/InvalidPageSizeParameters.md deleted file mode 100644 index 53034363d..000000000 --- a/docs/InvalidPageSizeParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidPageSizeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page_size** | **int** | The page size to use for the endpoint. | - -## Example - -```python -from foundry.models import InvalidPageSizeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPageSizeParameters from a JSON string -invalid_page_size_parameters_instance = InvalidPageSizeParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPageSizeParameters.to_json()) - -# convert the object into a dict -invalid_page_size_parameters_dict = invalid_page_size_parameters_instance.to_dict() -# create an instance of InvalidPageSizeParameters from a dict -invalid_page_size_parameters_form_dict = invalid_page_size_parameters.from_dict(invalid_page_size_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPageToken.md b/docs/InvalidPageToken.md deleted file mode 100644 index 357961a6c..000000000 --- a/docs/InvalidPageToken.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPageToken - -The provided page token could not be used to retrieve the next page of results. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPageTokenParameters**](InvalidPageTokenParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPageToken - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPageToken from a JSON string -invalid_page_token_instance = InvalidPageToken.from_json(json) -# print the JSON string representation of the object -print(InvalidPageToken.to_json()) - -# convert the object into a dict -invalid_page_token_dict = invalid_page_token_instance.to_dict() -# create an instance of InvalidPageToken from a dict -invalid_page_token_form_dict = invalid_page_token.from_dict(invalid_page_token_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPageTokenParameters.md b/docs/InvalidPageTokenParameters.md deleted file mode 100644 index ae753a82f..000000000 --- a/docs/InvalidPageTokenParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidPageTokenParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page_token** | **str** | The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the \`nextPageToken\` field of the previous response and populate the next request's \`pageToken\` field with it. | - -## Example - -```python -from foundry.models import InvalidPageTokenParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPageTokenParameters from a JSON string -invalid_page_token_parameters_instance = InvalidPageTokenParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPageTokenParameters.to_json()) - -# convert the object into a dict -invalid_page_token_parameters_dict = invalid_page_token_parameters_instance.to_dict() -# create an instance of InvalidPageTokenParameters from a dict -invalid_page_token_parameters_form_dict = invalid_page_token_parameters.from_dict(invalid_page_token_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidParameterCombination.md b/docs/InvalidParameterCombination.md deleted file mode 100644 index 80e613cbd..000000000 --- a/docs/InvalidParameterCombination.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidParameterCombination - -The given parameters are individually valid but cannot be used in the given combination. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidParameterCombinationParameters**](InvalidParameterCombinationParameters.md) | | - -## Example - -```python -from foundry.models import InvalidParameterCombination - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidParameterCombination from a JSON string -invalid_parameter_combination_instance = InvalidParameterCombination.from_json(json) -# print the JSON string representation of the object -print(InvalidParameterCombination.to_json()) - -# convert the object into a dict -invalid_parameter_combination_dict = invalid_parameter_combination_instance.to_dict() -# create an instance of InvalidParameterCombination from a dict -invalid_parameter_combination_form_dict = invalid_parameter_combination.from_dict(invalid_parameter_combination_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidParameterCombinationParameters.md b/docs/InvalidParameterCombinationParameters.md deleted file mode 100644 index 653827208..000000000 --- a/docs/InvalidParameterCombinationParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# InvalidParameterCombinationParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**provided_parameters** | **List\[str\]** | | \[optional\] -**valid_combinations** | **List\[List\[str\]\]** | | \[optional\] - -## Example - -```python -from foundry.models import InvalidParameterCombinationParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidParameterCombinationParameters from a JSON string -invalid_parameter_combination_parameters_instance = InvalidParameterCombinationParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidParameterCombinationParameters.to_json()) - -# convert the object into a dict -invalid_parameter_combination_parameters_dict = invalid_parameter_combination_parameters_instance.to_dict() -# create an instance of InvalidParameterCombinationParameters from a dict -invalid_parameter_combination_parameters_form_dict = invalid_parameter_combination_parameters.from_dict(invalid_parameter_combination_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidParameterValue.md b/docs/InvalidParameterValue.md deleted file mode 100644 index 60e783e92..000000000 --- a/docs/InvalidParameterValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidParameterValue - -The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidParameterValueParameters**](InvalidParameterValueParameters.md) | | - -## Example - -```python -from foundry.models import InvalidParameterValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidParameterValue from a JSON string -invalid_parameter_value_instance = InvalidParameterValue.from_json(json) -# print the JSON string representation of the object -print(InvalidParameterValue.to_json()) - -# convert the object into a dict -invalid_parameter_value_dict = invalid_parameter_value_instance.to_dict() -# create an instance of InvalidParameterValue from a dict -invalid_parameter_value_form_dict = invalid_parameter_value.from_dict(invalid_parameter_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidParameterValueParameters.md b/docs/InvalidParameterValueParameters.md deleted file mode 100644 index e621f3eb5..000000000 --- a/docs/InvalidParameterValueParameters.md +++ /dev/null @@ -1,30 +0,0 @@ -# InvalidParameterValueParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameter_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | \[optional\] -**parameter_data_type** | [**OntologyDataType**](OntologyDataType.md) | | \[optional\] -**parameter_id** | **str** | The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. | -**parameter_value** | **object** | Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | \`\[\"alpha\", \"bravo\", \"charlie\"\]\` | | Attachment | string | \`\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"\` | | Boolean | boolean | \`true\` | | Byte | number | \`31\` | | Date | ISO 8601 extended local date string | \`\"2021-05-01\"\` | | Decimal | string | \`\"2.718281828\"\` | | Float | number | \`3.14159265\` | | Double | number | \`3.14159265\` | | Integer | number | \`238940\` | | Long | string | \`\"58319870951433\"\` | | Null | null | \`null\` | | Object Set | string | \`ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z\`| | Ontology Object Reference | JSON encoding of the object's primary key | \`10033123\` or \`\"EMP1234\"\` | | Set | array | \`\[\"alpha\", \"bravo\", \"charlie\"\]\` | | Short | number | \`8739\` | | String | string | \`\"Call me Ishmael\"\` | | Struct | JSON object | \`{\"name\": \"John Doe\", \"age\": 42}\` | | TwoDimensionalAggregation | JSON object | \`{\"groups\": \[{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}\]}\` | | ThreeDimensionalAggregation | JSON object | \`{\"groups\": \[{\"key\": \"NYC\", \"groups\": \[{\"key\": \"Engineer\", \"value\" : 100}\]}\]}\`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | \`\"2021-01-04T05:00:00Z\"\` | | \[optional\] - -## Example - -```python -from foundry.models import InvalidParameterValueParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidParameterValueParameters from a JSON string -invalid_parameter_value_parameters_instance = InvalidParameterValueParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidParameterValueParameters.to_json()) - -# convert the object into a dict -invalid_parameter_value_parameters_dict = invalid_parameter_value_parameters_instance.to_dict() -# create an instance of InvalidParameterValueParameters from a dict -invalid_parameter_value_parameters_form_dict = invalid_parameter_value_parameters.from_dict(invalid_parameter_value_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyFilterValue.md b/docs/InvalidPropertyFilterValue.md deleted file mode 100644 index be6f765d2..000000000 --- a/docs/InvalidPropertyFilterValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPropertyFilterValue - -The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPropertyFilterValueParameters**](InvalidPropertyFilterValueParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPropertyFilterValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyFilterValue from a JSON string -invalid_property_filter_value_instance = InvalidPropertyFilterValue.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyFilterValue.to_json()) - -# convert the object into a dict -invalid_property_filter_value_dict = invalid_property_filter_value_instance.to_dict() -# create an instance of InvalidPropertyFilterValue from a dict -invalid_property_filter_value_form_dict = invalid_property_filter_value.from_dict(invalid_property_filter_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyFilterValueParameters.md b/docs/InvalidPropertyFilterValueParameters.md deleted file mode 100644 index 7029bdc4a..000000000 --- a/docs/InvalidPropertyFilterValueParameters.md +++ /dev/null @@ -1,30 +0,0 @@ -# InvalidPropertyFilterValueParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expected_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_filter** | **str** | Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: \`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}\` to filter the returned objects. For instance, you may use \`properties.firstName.eq=John\` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - \`properties.{propertyApiName}.contains\` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - \`properties.{propertyApiName}.eq\` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing \`?properties.firstName.eq=John&properties.firstName.eq=Anna\`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - \`properties.{propertyApiName}.neq\` - used to filter objects that do not have the provided property values. Similar to the \`eq\` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - \`properties.{propertyApiName}.lt\`, \`properties.{propertyApiName}.lte\`, \`properties.{propertyApiName}.gt\` \`properties.{propertyApiName}.gte\` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - \`properties.{propertyApiName}.isNull\` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. | -**property_filter_value** | **str** | Represents the value of a property filter. For instance, false is the FilterValue in \`properties.{propertyApiName}.isNull=false\`. | - -## Example - -```python -from foundry.models import InvalidPropertyFilterValueParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyFilterValueParameters from a JSON string -invalid_property_filter_value_parameters_instance = InvalidPropertyFilterValueParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyFilterValueParameters.to_json()) - -# convert the object into a dict -invalid_property_filter_value_parameters_dict = invalid_property_filter_value_parameters_instance.to_dict() -# create an instance of InvalidPropertyFilterValueParameters from a dict -invalid_property_filter_value_parameters_form_dict = invalid_property_filter_value_parameters.from_dict(invalid_property_filter_value_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyFiltersCombination.md b/docs/InvalidPropertyFiltersCombination.md deleted file mode 100644 index b699b7eaa..000000000 --- a/docs/InvalidPropertyFiltersCombination.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPropertyFiltersCombination - -The provided filters cannot be used together. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPropertyFiltersCombinationParameters**](InvalidPropertyFiltersCombinationParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPropertyFiltersCombination - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyFiltersCombination from a JSON string -invalid_property_filters_combination_instance = InvalidPropertyFiltersCombination.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyFiltersCombination.to_json()) - -# convert the object into a dict -invalid_property_filters_combination_dict = invalid_property_filters_combination_instance.to_dict() -# create an instance of InvalidPropertyFiltersCombination from a dict -invalid_property_filters_combination_form_dict = invalid_property_filters_combination.from_dict(invalid_property_filters_combination_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyFiltersCombinationParameters.md b/docs/InvalidPropertyFiltersCombinationParameters.md deleted file mode 100644 index e08155536..000000000 --- a/docs/InvalidPropertyFiltersCombinationParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# InvalidPropertyFiltersCombinationParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_filters** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import InvalidPropertyFiltersCombinationParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyFiltersCombinationParameters from a JSON string -invalid_property_filters_combination_parameters_instance = InvalidPropertyFiltersCombinationParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyFiltersCombinationParameters.to_json()) - -# convert the object into a dict -invalid_property_filters_combination_parameters_dict = invalid_property_filters_combination_parameters_instance.to_dict() -# create an instance of InvalidPropertyFiltersCombinationParameters from a dict -invalid_property_filters_combination_parameters_form_dict = invalid_property_filters_combination_parameters.from_dict(invalid_property_filters_combination_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyType.md b/docs/InvalidPropertyType.md deleted file mode 100644 index 2c623ec00..000000000 --- a/docs/InvalidPropertyType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPropertyType - -The given property type is not of the expected type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPropertyTypeParameters**](InvalidPropertyTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPropertyType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyType from a JSON string -invalid_property_type_instance = InvalidPropertyType.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyType.to_json()) - -# convert the object into a dict -invalid_property_type_dict = invalid_property_type_instance.to_dict() -# create an instance of InvalidPropertyType from a dict -invalid_property_type_form_dict = invalid_property_type.from_dict(invalid_property_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyTypeParameters.md b/docs/InvalidPropertyTypeParameters.md deleted file mode 100644 index 0297fe12c..000000000 --- a/docs/InvalidPropertyTypeParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# InvalidPropertyTypeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | - -## Example - -```python -from foundry.models import InvalidPropertyTypeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyTypeParameters from a JSON string -invalid_property_type_parameters_instance = InvalidPropertyTypeParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyTypeParameters.to_json()) - -# convert the object into a dict -invalid_property_type_parameters_dict = invalid_property_type_parameters_instance.to_dict() -# create an instance of InvalidPropertyTypeParameters from a dict -invalid_property_type_parameters_form_dict = invalid_property_type_parameters.from_dict(invalid_property_type_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyValue.md b/docs/InvalidPropertyValue.md deleted file mode 100644 index 1c011eb6d..000000000 --- a/docs/InvalidPropertyValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidPropertyValue - -The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPropertyValueParameters**](InvalidPropertyValueParameters.md) | | - -## Example - -```python -from foundry.models import InvalidPropertyValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyValue from a JSON string -invalid_property_value_instance = InvalidPropertyValue.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyValue.to_json()) - -# convert the object into a dict -invalid_property_value_dict = invalid_property_value_instance.to_dict() -# create an instance of InvalidPropertyValue from a dict -invalid_property_value_form_dict = invalid_property_value.from_dict(invalid_property_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidPropertyValueParameters.md b/docs/InvalidPropertyValueParameters.md deleted file mode 100644 index b5764b208..000000000 --- a/docs/InvalidPropertyValueParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# InvalidPropertyValueParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | -**property_value** | **object** | Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | \`\[\"alpha\", \"bravo\", \"charlie\"\]\` | | Attachment | JSON encoded \`AttachmentProperty\` object | \`{\"rid\":\"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"}\` | | Boolean | boolean | \`true\` | | Byte | number | \`31\` | | Date | ISO 8601 extended local date string | \`\"2021-05-01\"\` | | Decimal | string | \`\"2.718281828\"\` | | Double | number | \`3.14159265\` | | Float | number | \`3.14159265\` | | GeoPoint | geojson | \`{\"type\":\"Point\",\"coordinates\":\[102.0,0.5\]}\` | | GeoShape | geojson | \`{\"type\":\"LineString\",\"coordinates\":\[\[102.0,0.0\],\[103.0,1.0\],\[104.0,0.0\],\[105.0,1.0\]\]}\` | | Integer | number | \`238940\` | | Long | string | \`\"58319870951433\"\` | | Short | number | \`8739\` | | String | string | \`\"Call me Ishmael\"\` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | \`\"2021-01-04T05:00:00Z\"\` | | - -## Example - -```python -from foundry.models import InvalidPropertyValueParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidPropertyValueParameters from a JSON string -invalid_property_value_parameters_instance = InvalidPropertyValueParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidPropertyValueParameters.to_json()) - -# convert the object into a dict -invalid_property_value_parameters_dict = invalid_property_value_parameters_instance.to_dict() -# create an instance of InvalidPropertyValueParameters from a dict -invalid_property_value_parameters_form_dict = invalid_property_value_parameters.from_dict(invalid_property_value_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidQueryParameterValue.md b/docs/InvalidQueryParameterValue.md deleted file mode 100644 index 786d9509a..000000000 --- a/docs/InvalidQueryParameterValue.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidQueryParameterValue - -The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidQueryParameterValueParameters**](InvalidQueryParameterValueParameters.md) | | - -## Example - -```python -from foundry.models import InvalidQueryParameterValue - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidQueryParameterValue from a JSON string -invalid_query_parameter_value_instance = InvalidQueryParameterValue.from_json(json) -# print the JSON string representation of the object -print(InvalidQueryParameterValue.to_json()) - -# convert the object into a dict -invalid_query_parameter_value_dict = invalid_query_parameter_value_instance.to_dict() -# create an instance of InvalidQueryParameterValue from a dict -invalid_query_parameter_value_form_dict = invalid_query_parameter_value.from_dict(invalid_query_parameter_value_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidQueryParameterValueParameters.md b/docs/InvalidQueryParameterValueParameters.md deleted file mode 100644 index 3a58b70b1..000000000 --- a/docs/InvalidQueryParameterValueParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# InvalidQueryParameterValueParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameter_data_type** | [**QueryDataType**](QueryDataType.md) | | -**parameter_id** | **str** | The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. | -**parameter_value** | **object** | Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | \`\[\"alpha\", \"bravo\", \"charlie\"\]\` | | Attachment | string | \`\"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e\"\` | | Boolean | boolean | \`true\` | | Byte | number | \`31\` | | Date | ISO 8601 extended local date string | \`\"2021-05-01\"\` | | Decimal | string | \`\"2.718281828\"\` | | Float | number | \`3.14159265\` | | Double | number | \`3.14159265\` | | Integer | number | \`238940\` | | Long | string | \`\"58319870951433\"\` | | Null | null | \`null\` | | Object Set | string | \`ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z\`| | Ontology Object Reference | JSON encoding of the object's primary key | \`10033123\` or \`\"EMP1234\"\` | | Set | array | \`\[\"alpha\", \"bravo\", \"charlie\"\]\` | | Short | number | \`8739\` | | String | string | \`\"Call me Ishmael\"\` | | Struct | JSON object | \`{\"name\": \"John Doe\", \"age\": 42}\` | | TwoDimensionalAggregation | JSON object | \`{\"groups\": \[{\"key\": \"alpha\", \"value\": 100}, {\"key\": \"beta\", \"value\": 101}\]}\` | | ThreeDimensionalAggregation | JSON object | \`{\"groups\": \[{\"key\": \"NYC\", \"groups\": \[{\"key\": \"Engineer\", \"value\" : 100}\]}\]}\`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | \`\"2021-01-04T05:00:00Z\"\` | | \[optional\] - -## Example - -```python -from foundry.models import InvalidQueryParameterValueParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidQueryParameterValueParameters from a JSON string -invalid_query_parameter_value_parameters_instance = InvalidQueryParameterValueParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidQueryParameterValueParameters.to_json()) - -# convert the object into a dict -invalid_query_parameter_value_parameters_dict = invalid_query_parameter_value_parameters_instance.to_dict() -# create an instance of InvalidQueryParameterValueParameters from a dict -invalid_query_parameter_value_parameters_form_dict = invalid_query_parameter_value_parameters.from_dict(invalid_query_parameter_value_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidRangeQuery.md b/docs/InvalidRangeQuery.md deleted file mode 100644 index 461514854..000000000 --- a/docs/InvalidRangeQuery.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidRangeQuery - -The specified query range filter is invalid. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidRangeQueryParameters**](InvalidRangeQueryParameters.md) | | - -## Example - -```python -from foundry.models import InvalidRangeQuery - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidRangeQuery from a JSON string -invalid_range_query_instance = InvalidRangeQuery.from_json(json) -# print the JSON string representation of the object -print(InvalidRangeQuery.to_json()) - -# convert the object into a dict -invalid_range_query_dict = invalid_range_query_instance.to_dict() -# create an instance of InvalidRangeQuery from a dict -invalid_range_query_form_dict = invalid_range_query.from_dict(invalid_range_query_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidRangeQueryParameters.md b/docs/InvalidRangeQueryParameters.md deleted file mode 100644 index 922969fbe..000000000 --- a/docs/InvalidRangeQueryParameters.md +++ /dev/null @@ -1,31 +0,0 @@ -# InvalidRangeQueryParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**field** | **str** | | -**gt** | **object** | Greater than | \[optional\] -**gte** | **object** | Greater than or equal | \[optional\] -**lt** | **object** | Less than | \[optional\] -**lte** | **object** | Less than or equal | \[optional\] - -## Example - -```python -from foundry.models import InvalidRangeQueryParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidRangeQueryParameters from a JSON string -invalid_range_query_parameters_instance = InvalidRangeQueryParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidRangeQueryParameters.to_json()) - -# convert the object into a dict -invalid_range_query_parameters_dict = invalid_range_query_parameters_instance.to_dict() -# create an instance of InvalidRangeQueryParameters from a dict -invalid_range_query_parameters_form_dict = invalid_range_query_parameters.from_dict(invalid_range_query_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidSortOrder.md b/docs/InvalidSortOrder.md deleted file mode 100644 index 696681df4..000000000 --- a/docs/InvalidSortOrder.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidSortOrder - -The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidSortOrderParameters**](InvalidSortOrderParameters.md) | | - -## Example - -```python -from foundry.models import InvalidSortOrder - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidSortOrder from a JSON string -invalid_sort_order_instance = InvalidSortOrder.from_json(json) -# print the JSON string representation of the object -print(InvalidSortOrder.to_json()) - -# convert the object into a dict -invalid_sort_order_dict = invalid_sort_order_instance.to_dict() -# create an instance of InvalidSortOrder from a dict -invalid_sort_order_form_dict = invalid_sort_order.from_dict(invalid_sort_order_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidSortOrderParameters.md b/docs/InvalidSortOrderParameters.md deleted file mode 100644 index ab7ed20ce..000000000 --- a/docs/InvalidSortOrderParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidSortOrderParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invalid_sort_order** | **str** | | - -## Example - -```python -from foundry.models import InvalidSortOrderParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidSortOrderParameters from a JSON string -invalid_sort_order_parameters_instance = InvalidSortOrderParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidSortOrderParameters.to_json()) - -# convert the object into a dict -invalid_sort_order_parameters_dict = invalid_sort_order_parameters_instance.to_dict() -# create an instance of InvalidSortOrderParameters from a dict -invalid_sort_order_parameters_form_dict = invalid_sort_order_parameters.from_dict(invalid_sort_order_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidSortType.md b/docs/InvalidSortType.md deleted file mode 100644 index 34b63f88a..000000000 --- a/docs/InvalidSortType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidSortType - -The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidSortTypeParameters**](InvalidSortTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidSortType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidSortType from a JSON string -invalid_sort_type_instance = InvalidSortType.from_json(json) -# print the JSON string representation of the object -print(InvalidSortType.to_json()) - -# convert the object into a dict -invalid_sort_type_dict = invalid_sort_type_instance.to_dict() -# create an instance of InvalidSortType from a dict -invalid_sort_type_form_dict = invalid_sort_type.from_dict(invalid_sort_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidSortTypeParameters.md b/docs/InvalidSortTypeParameters.md deleted file mode 100644 index 1c0e422a5..000000000 --- a/docs/InvalidSortTypeParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidSortTypeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**invalid_sort_type** | **str** | | - -## Example - -```python -from foundry.models import InvalidSortTypeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidSortTypeParameters from a JSON string -invalid_sort_type_parameters_instance = InvalidSortTypeParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidSortTypeParameters.to_json()) - -# convert the object into a dict -invalid_sort_type_parameters_dict = invalid_sort_type_parameters_instance.to_dict() -# create an instance of InvalidSortTypeParameters from a dict -invalid_sort_type_parameters_form_dict = invalid_sort_type_parameters.from_dict(invalid_sort_type_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidTransactionType.md b/docs/InvalidTransactionType.md deleted file mode 100644 index 8126f6f68..000000000 --- a/docs/InvalidTransactionType.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidTransactionType - -The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidTransactionTypeParameters**](InvalidTransactionTypeParameters.md) | | - -## Example - -```python -from foundry.models import InvalidTransactionType - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidTransactionType from a JSON string -invalid_transaction_type_instance = InvalidTransactionType.from_json(json) -# print the JSON string representation of the object -print(InvalidTransactionType.to_json()) - -# convert the object into a dict -invalid_transaction_type_dict = invalid_transaction_type_instance.to_dict() -# create an instance of InvalidTransactionType from a dict -invalid_transaction_type_form_dict = invalid_transaction_type.from_dict(invalid_transaction_type_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidTransactionTypeParameters.md b/docs/InvalidTransactionTypeParameters.md deleted file mode 100644 index b306cf314..000000000 --- a/docs/InvalidTransactionTypeParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# InvalidTransactionTypeParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | -**transaction_type** | [**TransactionType**](TransactionType.md) | | - -## Example - -```python -from foundry.models import InvalidTransactionTypeParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidTransactionTypeParameters from a JSON string -invalid_transaction_type_parameters_instance = InvalidTransactionTypeParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidTransactionTypeParameters.to_json()) - -# convert the object into a dict -invalid_transaction_type_parameters_dict = invalid_transaction_type_parameters_instance.to_dict() -# create an instance of InvalidTransactionTypeParameters from a dict -invalid_transaction_type_parameters_form_dict = invalid_transaction_type_parameters.from_dict(invalid_transaction_type_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidUserId.md b/docs/InvalidUserId.md deleted file mode 100644 index b391a9235..000000000 --- a/docs/InvalidUserId.md +++ /dev/null @@ -1,32 +0,0 @@ -# InvalidUserId - -The provided value for a user id must be a UUID. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidUserIdParameters**](InvalidUserIdParameters.md) | | - -## Example - -```python -from foundry.models import InvalidUserId - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidUserId from a JSON string -invalid_user_id_instance = InvalidUserId.from_json(json) -# print the JSON string representation of the object -print(InvalidUserId.to_json()) - -# convert the object into a dict -invalid_user_id_dict = invalid_user_id_instance.to_dict() -# create an instance of InvalidUserId from a dict -invalid_user_id_form_dict = invalid_user_id.from_dict(invalid_user_id_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/InvalidUserIdParameters.md b/docs/InvalidUserIdParameters.md deleted file mode 100644 index 7a1bcea10..000000000 --- a/docs/InvalidUserIdParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# InvalidUserIdParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | **str** | | - -## Example - -```python -from foundry.models import InvalidUserIdParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of InvalidUserIdParameters from a JSON string -invalid_user_id_parameters_instance = InvalidUserIdParameters.from_json(json) -# print the JSON string representation of the object -print(InvalidUserIdParameters.to_json()) - -# convert the object into a dict -invalid_user_id_parameters_dict = invalid_user_id_parameters_instance.to_dict() -# create an instance of InvalidUserIdParameters from a dict -invalid_user_id_parameters_form_dict = invalid_user_id_parameters.from_dict(invalid_user_id_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LanguageModelSource.md b/docs/LanguageModelSource.md deleted file mode 100644 index 0a51183a8..000000000 --- a/docs/LanguageModelSource.md +++ /dev/null @@ -1,11 +0,0 @@ -# LanguageModelSource - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -**GLOBAL** | 'global' | | -**HOSTED** | 'hosted' | | - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LanguageModelSourceNotSupported.md b/docs/LanguageModelSourceNotSupported.md deleted file mode 100644 index 6c9984b38..000000000 --- a/docs/LanguageModelSourceNotSupported.md +++ /dev/null @@ -1,30 +0,0 @@ -# LanguageModelSourceNotSupported - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**LanguageModelSourceNotSupportedParameters**](LanguageModelSourceNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import LanguageModelSourceNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of LanguageModelSourceNotSupported from a JSON string -language_model_source_not_supported_instance = LanguageModelSourceNotSupported.from_json(json) -# print the JSON string representation of the object -print(LanguageModelSourceNotSupported.to_json()) - -# convert the object into a dict -language_model_source_not_supported_dict = language_model_source_not_supported_instance.to_dict() -# create an instance of LanguageModelSourceNotSupported from a dict -language_model_source_not_supported_form_dict = language_model_source_not_supported.from_dict(language_model_source_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LanguageModelSourceNotSupportedParameters.md b/docs/LanguageModelSourceNotSupportedParameters.md deleted file mode 100644 index 926474093..000000000 --- a/docs/LanguageModelSourceNotSupportedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# LanguageModelSourceNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**source** | [**LanguageModelSource**](LanguageModelSource.md) | | - -## Example - -```python -from foundry.models import LanguageModelSourceNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of LanguageModelSourceNotSupportedParameters from a JSON string -language_model_source_not_supported_parameters_instance = LanguageModelSourceNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(LanguageModelSourceNotSupportedParameters.to_json()) - -# convert the object into a dict -language_model_source_not_supported_parameters_dict = language_model_source_not_supported_parameters_instance.to_dict() -# create an instance of LanguageModelSourceNotSupportedParameters from a dict -language_model_source_not_supported_parameters_form_dict = language_model_source_not_supported_parameters.from_dict(language_model_source_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LinkAlreadyExists.md b/docs/LinkAlreadyExists.md deleted file mode 100644 index f51b98043..000000000 --- a/docs/LinkAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# LinkAlreadyExists - -The link the user is attempting to create already exists. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import LinkAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkAlreadyExists from a JSON string -link_already_exists_instance = LinkAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(LinkAlreadyExists.to_json()) - -# convert the object into a dict -link_already_exists_dict = link_already_exists_instance.to_dict() -# create an instance of LinkAlreadyExists from a dict -link_already_exists_form_dict = link_already_exists.from_dict(link_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LinkTypeNotFound.md b/docs/LinkTypeNotFound.md deleted file mode 100644 index e08a92571..000000000 --- a/docs/LinkTypeNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# LinkTypeNotFound - -The link type is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**LinkTypeNotFoundParameters**](LinkTypeNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import LinkTypeNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkTypeNotFound from a JSON string -link_type_not_found_instance = LinkTypeNotFound.from_json(json) -# print the JSON string representation of the object -print(LinkTypeNotFound.to_json()) - -# convert the object into a dict -link_type_not_found_dict = link_type_not_found_instance.to_dict() -# create an instance of LinkTypeNotFound from a dict -link_type_not_found_form_dict = link_type_not_found.from_dict(link_type_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LinkTypeNotFoundParameters.md b/docs/LinkTypeNotFoundParameters.md deleted file mode 100644 index a22a0110b..000000000 --- a/docs/LinkTypeNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# LinkTypeNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**link_type** | **str** | The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. | -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | - -## Example - -```python -from foundry.models import LinkTypeNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkTypeNotFoundParameters from a JSON string -link_type_not_found_parameters_instance = LinkTypeNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(LinkTypeNotFoundParameters.to_json()) - -# convert the object into a dict -link_type_not_found_parameters_dict = link_type_not_found_parameters_instance.to_dict() -# create an instance of LinkTypeNotFoundParameters from a dict -link_type_not_found_parameters_form_dict = link_type_not_found_parameters.from_dict(link_type_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LinkedObjectNotFound.md b/docs/LinkedObjectNotFound.md deleted file mode 100644 index c9ab857e2..000000000 --- a/docs/LinkedObjectNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# LinkedObjectNotFound - -The linked object with the given primary key is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**LinkedObjectNotFoundParameters**](LinkedObjectNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import LinkedObjectNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkedObjectNotFound from a JSON string -linked_object_not_found_instance = LinkedObjectNotFound.from_json(json) -# print the JSON string representation of the object -print(LinkedObjectNotFound.to_json()) - -# convert the object into a dict -linked_object_not_found_dict = linked_object_not_found_instance.to_dict() -# create an instance of LinkedObjectNotFound from a dict -linked_object_not_found_form_dict = linked_object_not_found.from_dict(linked_object_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/LinkedObjectNotFoundParameters.md b/docs/LinkedObjectNotFoundParameters.md deleted file mode 100644 index c3e59eac4..000000000 --- a/docs/LinkedObjectNotFoundParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# LinkedObjectNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**link_type** | **str** | The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. | -**linked_object_primary_key** | **Dict\[str, object\]** | | \[optional\] -**linked_object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | - -## Example - -```python -from foundry.models import LinkedObjectNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of LinkedObjectNotFoundParameters from a JSON string -linked_object_not_found_parameters_instance = LinkedObjectNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(LinkedObjectNotFoundParameters.to_json()) - -# convert the object into a dict -linked_object_not_found_parameters_dict = linked_object_not_found_parameters_instance.to_dict() -# create an instance of LinkedObjectNotFoundParameters from a dict -linked_object_not_found_parameters_form_dict = linked_object_not_found_parameters.from_dict(linked_object_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MalformedPropertyFilters.md b/docs/MalformedPropertyFilters.md deleted file mode 100644 index 2973e7b78..000000000 --- a/docs/MalformedPropertyFilters.md +++ /dev/null @@ -1,32 +0,0 @@ -# MalformedPropertyFilters - -At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MalformedPropertyFiltersParameters**](MalformedPropertyFiltersParameters.md) | | - -## Example - -```python -from foundry.models import MalformedPropertyFilters - -# TODO update the JSON string below -json = "{}" -# create an instance of MalformedPropertyFilters from a JSON string -malformed_property_filters_instance = MalformedPropertyFilters.from_json(json) -# print the JSON string representation of the object -print(MalformedPropertyFilters.to_json()) - -# convert the object into a dict -malformed_property_filters_dict = malformed_property_filters_instance.to_dict() -# create an instance of MalformedPropertyFilters from a dict -malformed_property_filters_form_dict = malformed_property_filters.from_dict(malformed_property_filters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MalformedPropertyFiltersParameters.md b/docs/MalformedPropertyFiltersParameters.md deleted file mode 100644 index 9c18e7fe4..000000000 --- a/docs/MalformedPropertyFiltersParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# MalformedPropertyFiltersParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**malformed_property_filter** | **str** | | - -## Example - -```python -from foundry.models import MalformedPropertyFiltersParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MalformedPropertyFiltersParameters from a JSON string -malformed_property_filters_parameters_instance = MalformedPropertyFiltersParameters.from_json(json) -# print the JSON string representation of the object -print(MalformedPropertyFiltersParameters.to_json()) - -# convert the object into a dict -malformed_property_filters_parameters_dict = malformed_property_filters_parameters_instance.to_dict() -# create an instance of MalformedPropertyFiltersParameters from a dict -malformed_property_filters_parameters_form_dict = malformed_property_filters_parameters.from_dict(malformed_property_filters_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceActionMappingNotFound.md b/docs/MarketplaceActionMappingNotFound.md deleted file mode 100644 index ffafe9940..000000000 --- a/docs/MarketplaceActionMappingNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarketplaceActionMappingNotFound - -The given action could not be mapped to a Marketplace installation. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MarketplaceActionMappingNotFoundParameters**](MarketplaceActionMappingNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import MarketplaceActionMappingNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceActionMappingNotFound from a JSON string -marketplace_action_mapping_not_found_instance = MarketplaceActionMappingNotFound.from_json(json) -# print the JSON string representation of the object -print(MarketplaceActionMappingNotFound.to_json()) - -# convert the object into a dict -marketplace_action_mapping_not_found_dict = marketplace_action_mapping_not_found_instance.to_dict() -# create an instance of MarketplaceActionMappingNotFound from a dict -marketplace_action_mapping_not_found_form_dict = marketplace_action_mapping_not_found.from_dict(marketplace_action_mapping_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceActionMappingNotFoundParameters.md b/docs/MarketplaceActionMappingNotFoundParameters.md deleted file mode 100644 index 1f72ec483..000000000 --- a/docs/MarketplaceActionMappingNotFoundParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# MarketplaceActionMappingNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_type** | **str** | The name of the action type in the API. To find the API name for your Action Type, use the \`List action types\` endpoint or check the **Ontology Manager**. | -**artifact_repository** | **str** | | -**package_name** | **str** | | - -## Example - -```python -from foundry.models import MarketplaceActionMappingNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceActionMappingNotFoundParameters from a JSON string -marketplace_action_mapping_not_found_parameters_instance = MarketplaceActionMappingNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(MarketplaceActionMappingNotFoundParameters.to_json()) - -# convert the object into a dict -marketplace_action_mapping_not_found_parameters_dict = marketplace_action_mapping_not_found_parameters_instance.to_dict() -# create an instance of MarketplaceActionMappingNotFoundParameters from a dict -marketplace_action_mapping_not_found_parameters_form_dict = marketplace_action_mapping_not_found_parameters.from_dict(marketplace_action_mapping_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceInstallationNotFound.md b/docs/MarketplaceInstallationNotFound.md deleted file mode 100644 index d68f5d992..000000000 --- a/docs/MarketplaceInstallationNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarketplaceInstallationNotFound - -The given marketplace installation could not be found or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MarketplaceInstallationNotFoundParameters**](MarketplaceInstallationNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import MarketplaceInstallationNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceInstallationNotFound from a JSON string -marketplace_installation_not_found_instance = MarketplaceInstallationNotFound.from_json(json) -# print the JSON string representation of the object -print(MarketplaceInstallationNotFound.to_json()) - -# convert the object into a dict -marketplace_installation_not_found_dict = marketplace_installation_not_found_instance.to_dict() -# create an instance of MarketplaceInstallationNotFound from a dict -marketplace_installation_not_found_form_dict = marketplace_installation_not_found.from_dict(marketplace_installation_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceInstallationNotFoundParameters.md b/docs/MarketplaceInstallationNotFoundParameters.md deleted file mode 100644 index 4ae466d92..000000000 --- a/docs/MarketplaceInstallationNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# MarketplaceInstallationNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifact_repository** | **str** | | -**package_name** | **str** | | - -## Example - -```python -from foundry.models import MarketplaceInstallationNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceInstallationNotFoundParameters from a JSON string -marketplace_installation_not_found_parameters_instance = MarketplaceInstallationNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(MarketplaceInstallationNotFoundParameters.to_json()) - -# convert the object into a dict -marketplace_installation_not_found_parameters_dict = marketplace_installation_not_found_parameters_instance.to_dict() -# create an instance of MarketplaceInstallationNotFoundParameters from a dict -marketplace_installation_not_found_parameters_form_dict = marketplace_installation_not_found_parameters.from_dict(marketplace_installation_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceLinkMappingNotFound.md b/docs/MarketplaceLinkMappingNotFound.md deleted file mode 100644 index 3f90803d5..000000000 --- a/docs/MarketplaceLinkMappingNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarketplaceLinkMappingNotFound - -The given link could not be mapped to a Marketplace installation. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MarketplaceLinkMappingNotFoundParameters**](MarketplaceLinkMappingNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import MarketplaceLinkMappingNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceLinkMappingNotFound from a JSON string -marketplace_link_mapping_not_found_instance = MarketplaceLinkMappingNotFound.from_json(json) -# print the JSON string representation of the object -print(MarketplaceLinkMappingNotFound.to_json()) - -# convert the object into a dict -marketplace_link_mapping_not_found_dict = marketplace_link_mapping_not_found_instance.to_dict() -# create an instance of MarketplaceLinkMappingNotFound from a dict -marketplace_link_mapping_not_found_form_dict = marketplace_link_mapping_not_found.from_dict(marketplace_link_mapping_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceLinkMappingNotFoundParameters.md b/docs/MarketplaceLinkMappingNotFoundParameters.md deleted file mode 100644 index bf41f6ebb..000000000 --- a/docs/MarketplaceLinkMappingNotFoundParameters.md +++ /dev/null @@ -1,30 +0,0 @@ -# MarketplaceLinkMappingNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifact_repository** | **str** | | -**link_type** | **str** | The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. | -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**package_name** | **str** | | - -## Example - -```python -from foundry.models import MarketplaceLinkMappingNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceLinkMappingNotFoundParameters from a JSON string -marketplace_link_mapping_not_found_parameters_instance = MarketplaceLinkMappingNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(MarketplaceLinkMappingNotFoundParameters.to_json()) - -# convert the object into a dict -marketplace_link_mapping_not_found_parameters_dict = marketplace_link_mapping_not_found_parameters_instance.to_dict() -# create an instance of MarketplaceLinkMappingNotFoundParameters from a dict -marketplace_link_mapping_not_found_parameters_form_dict = marketplace_link_mapping_not_found_parameters.from_dict(marketplace_link_mapping_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceObjectMappingNotFound.md b/docs/MarketplaceObjectMappingNotFound.md deleted file mode 100644 index 86541819b..000000000 --- a/docs/MarketplaceObjectMappingNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarketplaceObjectMappingNotFound - -The given object could not be mapped to a Marketplace installation. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MarketplaceObjectMappingNotFoundParameters**](MarketplaceObjectMappingNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import MarketplaceObjectMappingNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceObjectMappingNotFound from a JSON string -marketplace_object_mapping_not_found_instance = MarketplaceObjectMappingNotFound.from_json(json) -# print the JSON string representation of the object -print(MarketplaceObjectMappingNotFound.to_json()) - -# convert the object into a dict -marketplace_object_mapping_not_found_dict = marketplace_object_mapping_not_found_instance.to_dict() -# create an instance of MarketplaceObjectMappingNotFound from a dict -marketplace_object_mapping_not_found_form_dict = marketplace_object_mapping_not_found.from_dict(marketplace_object_mapping_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceObjectMappingNotFoundParameters.md b/docs/MarketplaceObjectMappingNotFoundParameters.md deleted file mode 100644 index 3b010daf3..000000000 --- a/docs/MarketplaceObjectMappingNotFoundParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# MarketplaceObjectMappingNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifact_repository** | **str** | | -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**package_name** | **str** | | - -## Example - -```python -from foundry.models import MarketplaceObjectMappingNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceObjectMappingNotFoundParameters from a JSON string -marketplace_object_mapping_not_found_parameters_instance = MarketplaceObjectMappingNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(MarketplaceObjectMappingNotFoundParameters.to_json()) - -# convert the object into a dict -marketplace_object_mapping_not_found_parameters_dict = marketplace_object_mapping_not_found_parameters_instance.to_dict() -# create an instance of MarketplaceObjectMappingNotFoundParameters from a dict -marketplace_object_mapping_not_found_parameters_form_dict = marketplace_object_mapping_not_found_parameters.from_dict(marketplace_object_mapping_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceQueryMappingNotFound.md b/docs/MarketplaceQueryMappingNotFound.md deleted file mode 100644 index 8de79f50b..000000000 --- a/docs/MarketplaceQueryMappingNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# MarketplaceQueryMappingNotFound - -The given query could not be mapped to a Marketplace installation. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MarketplaceQueryMappingNotFoundParameters**](MarketplaceQueryMappingNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import MarketplaceQueryMappingNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceQueryMappingNotFound from a JSON string -marketplace_query_mapping_not_found_instance = MarketplaceQueryMappingNotFound.from_json(json) -# print the JSON string representation of the object -print(MarketplaceQueryMappingNotFound.to_json()) - -# convert the object into a dict -marketplace_query_mapping_not_found_dict = marketplace_query_mapping_not_found_instance.to_dict() -# create an instance of MarketplaceQueryMappingNotFound from a dict -marketplace_query_mapping_not_found_form_dict = marketplace_query_mapping_not_found.from_dict(marketplace_query_mapping_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MarketplaceQueryMappingNotFoundParameters.md b/docs/MarketplaceQueryMappingNotFoundParameters.md deleted file mode 100644 index 69dffb639..000000000 --- a/docs/MarketplaceQueryMappingNotFoundParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# MarketplaceQueryMappingNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifact_repository** | **str** | | -**package_name** | **str** | | -**query_type** | **str** | The name of the Query in the API. | - -## Example - -```python -from foundry.models import MarketplaceQueryMappingNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MarketplaceQueryMappingNotFoundParameters from a JSON string -marketplace_query_mapping_not_found_parameters_instance = MarketplaceQueryMappingNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(MarketplaceQueryMappingNotFoundParameters.to_json()) - -# convert the object into a dict -marketplace_query_mapping_not_found_parameters_dict = marketplace_query_mapping_not_found_parameters_instance.to_dict() -# create an instance of MarketplaceQueryMappingNotFoundParameters from a dict -marketplace_query_mapping_not_found_parameters_form_dict = marketplace_query_mapping_not_found_parameters.from_dict(marketplace_query_mapping_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MissingParameter.md b/docs/MissingParameter.md deleted file mode 100644 index a3f7bb83f..000000000 --- a/docs/MissingParameter.md +++ /dev/null @@ -1,32 +0,0 @@ -# MissingParameter - -Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MissingParameterParameters**](MissingParameterParameters.md) | | - -## Example - -```python -from foundry.models import MissingParameter - -# TODO update the JSON string below -json = "{}" -# create an instance of MissingParameter from a JSON string -missing_parameter_instance = MissingParameter.from_json(json) -# print the JSON string representation of the object -print(MissingParameter.to_json()) - -# convert the object into a dict -missing_parameter_dict = missing_parameter_instance.to_dict() -# create an instance of MissingParameter from a dict -missing_parameter_form_dict = missing_parameter.from_dict(missing_parameter_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MissingParameterParameters.md b/docs/MissingParameterParameters.md deleted file mode 100644 index 0374ffd54..000000000 --- a/docs/MissingParameterParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# MissingParameterParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameters** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import MissingParameterParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MissingParameterParameters from a JSON string -missing_parameter_parameters_instance = MissingParameterParameters.from_json(json) -# print the JSON string representation of the object -print(MissingParameterParameters.to_json()) - -# convert the object into a dict -missing_parameter_parameters_dict = missing_parameter_parameters_instance.to_dict() -# create an instance of MissingParameterParameters from a dict -missing_parameter_parameters_form_dict = missing_parameter_parameters.from_dict(missing_parameter_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MissingPostBody.md b/docs/MissingPostBody.md deleted file mode 100644 index 6f39259b2..000000000 --- a/docs/MissingPostBody.md +++ /dev/null @@ -1,32 +0,0 @@ -# MissingPostBody - -A post body is required for this endpoint, but was not found in the request. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import MissingPostBody - -# TODO update the JSON string below -json = "{}" -# create an instance of MissingPostBody from a JSON string -missing_post_body_instance = MissingPostBody.from_json(json) -# print the JSON string representation of the object -print(MissingPostBody.to_json()) - -# convert the object into a dict -missing_post_body_dict = missing_post_body_instance.to_dict() -# create an instance of MissingPostBody from a dict -missing_post_body_form_dict = missing_post_body.from_dict(missing_post_body_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MultipleGroupByOnFieldNotSupported.md b/docs/MultipleGroupByOnFieldNotSupported.md deleted file mode 100644 index d5723bf8b..000000000 --- a/docs/MultipleGroupByOnFieldNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# MultipleGroupByOnFieldNotSupported - -Aggregation cannot group by on the same field multiple times. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MultipleGroupByOnFieldNotSupportedParameters**](MultipleGroupByOnFieldNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import MultipleGroupByOnFieldNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of MultipleGroupByOnFieldNotSupported from a JSON string -multiple_group_by_on_field_not_supported_instance = MultipleGroupByOnFieldNotSupported.from_json(json) -# print the JSON string representation of the object -print(MultipleGroupByOnFieldNotSupported.to_json()) - -# convert the object into a dict -multiple_group_by_on_field_not_supported_dict = multiple_group_by_on_field_not_supported_instance.to_dict() -# create an instance of MultipleGroupByOnFieldNotSupported from a dict -multiple_group_by_on_field_not_supported_form_dict = multiple_group_by_on_field_not_supported.from_dict(multiple_group_by_on_field_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MultipleGroupByOnFieldNotSupportedParameters.md b/docs/MultipleGroupByOnFieldNotSupportedParameters.md deleted file mode 100644 index 1779646a0..000000000 --- a/docs/MultipleGroupByOnFieldNotSupportedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# MultipleGroupByOnFieldNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**duplicate_fields** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import MultipleGroupByOnFieldNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MultipleGroupByOnFieldNotSupportedParameters from a JSON string -multiple_group_by_on_field_not_supported_parameters_instance = MultipleGroupByOnFieldNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(MultipleGroupByOnFieldNotSupportedParameters.to_json()) - -# convert the object into a dict -multiple_group_by_on_field_not_supported_parameters_dict = multiple_group_by_on_field_not_supported_parameters_instance.to_dict() -# create an instance of MultipleGroupByOnFieldNotSupportedParameters from a dict -multiple_group_by_on_field_not_supported_parameters_form_dict = multiple_group_by_on_field_not_supported_parameters.from_dict(multiple_group_by_on_field_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MultiplePropertyValuesNotSupported.md b/docs/MultiplePropertyValuesNotSupported.md deleted file mode 100644 index 7eb784a7f..000000000 --- a/docs/MultiplePropertyValuesNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# MultiplePropertyValuesNotSupported - -One of the requested property filters does not support multiple values. Please include only a single value for it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**MultiplePropertyValuesNotSupportedParameters**](MultiplePropertyValuesNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import MultiplePropertyValuesNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of MultiplePropertyValuesNotSupported from a JSON string -multiple_property_values_not_supported_instance = MultiplePropertyValuesNotSupported.from_json(json) -# print the JSON string representation of the object -print(MultiplePropertyValuesNotSupported.to_json()) - -# convert the object into a dict -multiple_property_values_not_supported_dict = multiple_property_values_not_supported_instance.to_dict() -# create an instance of MultiplePropertyValuesNotSupported from a dict -multiple_property_values_not_supported_form_dict = multiple_property_values_not_supported.from_dict(multiple_property_values_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/MultiplePropertyValuesNotSupportedParameters.md b/docs/MultiplePropertyValuesNotSupportedParameters.md deleted file mode 100644 index fe8eda59d..000000000 --- a/docs/MultiplePropertyValuesNotSupportedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# MultiplePropertyValuesNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_property** | **str** | The name of the property in the API. To find the API name for your property, use the \`Get object type\` endpoint or check the **Ontology Manager**. | -**property_filter** | **str** | Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: \`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}\` to filter the returned objects. For instance, you may use \`properties.firstName.eq=John\` to find objects that contain a property called \"firstName\" that has the exact value of \"John\". The following are a list of supported property filters: - \`properties.{propertyApiName}.contains\` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - \`properties.{propertyApiName}.eq\` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing \`?properties.firstName.eq=John&properties.firstName.eq=Anna\`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - \`properties.{propertyApiName}.neq\` - used to filter objects that do not have the provided property values. Similar to the \`eq\` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - \`properties.{propertyApiName}.lt\`, \`properties.{propertyApiName}.lte\`, \`properties.{propertyApiName}.gt\` \`properties.{propertyApiName}.gte\` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - \`properties.{propertyApiName}.isNull\` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. | - -## Example - -```python -from foundry.models import MultiplePropertyValuesNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of MultiplePropertyValuesNotSupportedParameters from a JSON string -multiple_property_values_not_supported_parameters_instance = MultiplePropertyValuesNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(MultiplePropertyValuesNotSupportedParameters.to_json()) - -# convert the object into a dict -multiple_property_values_not_supported_parameters_dict = multiple_property_values_not_supported_parameters_instance.to_dict() -# create an instance of MultiplePropertyValuesNotSupportedParameters from a dict -multiple_property_values_not_supported_parameters_form_dict = multiple_property_values_not_supported_parameters.from_dict(multiple_property_values_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectAlreadyExists.md b/docs/ObjectAlreadyExists.md deleted file mode 100644 index 3daa4c2b8..000000000 --- a/docs/ObjectAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectAlreadyExists - -The object the user is attempting to create already exists. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ObjectAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectAlreadyExists from a JSON string -object_already_exists_instance = ObjectAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(ObjectAlreadyExists.to_json()) - -# convert the object into a dict -object_already_exists_dict = object_already_exists_instance.to_dict() -# create an instance of ObjectAlreadyExists from a dict -object_already_exists_form_dict = object_already_exists.from_dict(object_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectChanged.md b/docs/ObjectChanged.md deleted file mode 100644 index bf8fc0492..000000000 --- a/docs/ObjectChanged.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectChanged - -An object used by this `Action` was changed by someone else while the `Action` was running. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ObjectChanged - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectChanged from a JSON string -object_changed_instance = ObjectChanged.from_json(json) -# print the JSON string representation of the object -print(ObjectChanged.to_json()) - -# convert the object into a dict -object_changed_dict = object_changed_instance.to_dict() -# create an instance of ObjectChanged from a dict -object_changed_form_dict = object_changed.from_dict(object_changed_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectNotFound.md b/docs/ObjectNotFound.md deleted file mode 100644 index 7361f29be..000000000 --- a/docs/ObjectNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectNotFound - -The requested object is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ObjectNotFoundParameters**](ObjectNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ObjectNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectNotFound from a JSON string -object_not_found_instance = ObjectNotFound.from_json(json) -# print the JSON string representation of the object -print(ObjectNotFound.to_json()) - -# convert the object into a dict -object_not_found_dict = object_not_found_instance.to_dict() -# create an instance of ObjectNotFound from a dict -object_not_found_form_dict = object_not_found.from_dict(object_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectNotFoundParameters.md b/docs/ObjectNotFoundParameters.md deleted file mode 100644 index 79afe891f..000000000 --- a/docs/ObjectNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ObjectNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | \[optional\] -**primary_key** | **Dict\[str, object\]** | | \[optional\] - -## Example - -```python -from foundry.models import ObjectNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectNotFoundParameters from a JSON string -object_not_found_parameters_instance = ObjectNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ObjectNotFoundParameters.to_json()) - -# convert the object into a dict -object_not_found_parameters_dict = object_not_found_parameters_instance.to_dict() -# create an instance of ObjectNotFoundParameters from a dict -object_not_found_parameters_form_dict = object_not_found_parameters.from_dict(object_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectTypeNotFound.md b/docs/ObjectTypeNotFound.md deleted file mode 100644 index 9faceff94..000000000 --- a/docs/ObjectTypeNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectTypeNotFound - -The requested object type is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ObjectTypeNotFoundParameters**](ObjectTypeNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ObjectTypeNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectTypeNotFound from a JSON string -object_type_not_found_instance = ObjectTypeNotFound.from_json(json) -# print the JSON string representation of the object -print(ObjectTypeNotFound.to_json()) - -# convert the object into a dict -object_type_not_found_dict = object_type_not_found_instance.to_dict() -# create an instance of ObjectTypeNotFound from a dict -object_type_not_found_form_dict = object_type_not_found.from_dict(object_type_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectTypeNotFoundParameters.md b/docs/ObjectTypeNotFoundParameters.md deleted file mode 100644 index b292f5e75..000000000 --- a/docs/ObjectTypeNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ObjectTypeNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | \[optional\] -**object_type_rid** | **str** | The unique resource identifier of an object type, useful for interacting with other Foundry APIs. | \[optional\] - -## Example - -```python -from foundry.models import ObjectTypeNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectTypeNotFoundParameters from a JSON string -object_type_not_found_parameters_instance = ObjectTypeNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ObjectTypeNotFoundParameters.to_json()) - -# convert the object into a dict -object_type_not_found_parameters_dict = object_type_not_found_parameters_instance.to_dict() -# create an instance of ObjectTypeNotFoundParameters from a dict -object_type_not_found_parameters_form_dict = object_type_not_found_parameters.from_dict(object_type_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectTypeNotSynced.md b/docs/ObjectTypeNotSynced.md deleted file mode 100644 index de2e7f576..000000000 --- a/docs/ObjectTypeNotSynced.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectTypeNotSynced - -The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ObjectTypeNotSyncedParameters**](ObjectTypeNotSyncedParameters.md) | | - -## Example - -```python -from foundry.models import ObjectTypeNotSynced - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectTypeNotSynced from a JSON string -object_type_not_synced_instance = ObjectTypeNotSynced.from_json(json) -# print the JSON string representation of the object -print(ObjectTypeNotSynced.to_json()) - -# convert the object into a dict -object_type_not_synced_dict = object_type_not_synced_instance.to_dict() -# create an instance of ObjectTypeNotSynced from a dict -object_type_not_synced_form_dict = object_type_not_synced.from_dict(object_type_not_synced_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectTypeNotSyncedParameters.md b/docs/ObjectTypeNotSyncedParameters.md deleted file mode 100644 index 563bd6e7f..000000000 --- a/docs/ObjectTypeNotSyncedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ObjectTypeNotSyncedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | - -## Example - -```python -from foundry.models import ObjectTypeNotSyncedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectTypeNotSyncedParameters from a JSON string -object_type_not_synced_parameters_instance = ObjectTypeNotSyncedParameters.from_json(json) -# print the JSON string representation of the object -print(ObjectTypeNotSyncedParameters.to_json()) - -# convert the object into a dict -object_type_not_synced_parameters_dict = object_type_not_synced_parameters_instance.to_dict() -# create an instance of ObjectTypeNotSyncedParameters from a dict -object_type_not_synced_parameters_form_dict = object_type_not_synced_parameters.from_dict(object_type_not_synced_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ObjectsExceededLimit.md b/docs/ObjectsExceededLimit.md deleted file mode 100644 index a6e9ff06a..000000000 --- a/docs/ObjectsExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# ObjectsExceededLimit - -There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ObjectsExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of ObjectsExceededLimit from a JSON string -objects_exceeded_limit_instance = ObjectsExceededLimit.from_json(json) -# print the JSON string representation of the object -print(ObjectsExceededLimit.to_json()) - -# convert the object into a dict -objects_exceeded_limit_dict = objects_exceeded_limit_instance.to_dict() -# create an instance of ObjectsExceededLimit from a dict -objects_exceeded_limit_form_dict = objects_exceeded_limit.from_dict(objects_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OntologiesApiServiceApi.md b/docs/OntologiesApiServiceApi.md index 299b8c591..880d22d06 100644 --- a/docs/OntologiesApiServiceApi.md +++ b/docs/OntologiesApiServiceApi.md @@ -2,8 +2,6 @@ The official Python library for the Foundry API -All URIs are relative to *http://localhost* - Method | HTTP request | Description ------------- | ------------- | ------------- [**get_action_type**]() | **GET** /v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName} | @@ -33,7 +31,7 @@ from foundry.models.action_type import ActionType from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the action type. action_type_api_name = 'promote-employee' # str | The name of the action type in the API. @@ -92,7 +90,7 @@ from foundry.models.object_type import ObjectType from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. object_type = 'employee' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. @@ -151,7 +149,7 @@ from foundry.models.ontology import Ontology from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. @@ -208,7 +206,7 @@ from foundry.models.link_type_side import LinkTypeSide from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. object_type = 'Employee' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. @@ -269,7 +267,7 @@ from foundry.models.query_type import QueryType from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. query_api_name = 'getEmployeesInCity' # str | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. @@ -330,7 +328,7 @@ from foundry.models.list_action_types_response import ListActionTypesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) @@ -391,7 +389,7 @@ from foundry.models.list_object_types_response import ListObjectTypesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) @@ -452,7 +450,7 @@ from foundry.models.list_ontologies_response import ListOntologiesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") try: @@ -506,7 +504,7 @@ from foundry.models.list_outgoing_link_types_response import ListOutgoingLinkTyp from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. object_type = 'Flight' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. @@ -569,7 +567,7 @@ from foundry.models.list_query_types_response import ListQueryTypesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology_rid = 'ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367' # str | The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) diff --git a/docs/OntologiesV2ApiServiceApi.md b/docs/OntologiesV2ApiServiceApi.md index 8c39c43e0..5076b3fc8 100644 --- a/docs/OntologiesV2ApiServiceApi.md +++ b/docs/OntologiesV2ApiServiceApi.md @@ -2,8 +2,6 @@ The official Python library for the Foundry API -All URIs are relative to *http://localhost* - Method | HTTP request | Description ------------- | ------------- | ------------- [**get_action_type**]() | **GET** /v2/ontologies/{ontology}/actionTypes/{actionType} | @@ -36,7 +34,7 @@ from foundry.models.action_type_v2 import ActionTypeV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. action_type = 'promote-employee' # str | The name of the action type in the API. @@ -95,7 +93,7 @@ from foundry.models.deployment_metadata import DeploymentMetadata from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. deployment = 'nextTokenPredictor' # str | The API name of the deployment you want to fetch information about. @@ -154,7 +152,7 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. object_type = 'employee' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. @@ -213,7 +211,7 @@ from foundry.models.ontology_full_metadata import OntologyFullMetadata from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. @@ -270,7 +268,7 @@ from foundry.models.ontology_v2 import OntologyV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. @@ -327,7 +325,7 @@ from foundry.models.link_type_side_v2 import LinkTypeSideV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. object_type = 'Employee' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. @@ -388,7 +386,7 @@ from foundry.models.query_type_v2 import QueryTypeV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. query_api_name = 'getEmployeesInCity' # str | The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. @@ -447,7 +445,7 @@ from foundry.models.list_action_types_response_v2 import ListActionTypesResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) @@ -508,7 +506,7 @@ from foundry.models.list_deployments_response import ListDeploymentsResponse from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. @@ -565,7 +563,7 @@ from foundry.models.list_object_types_v2_response import ListObjectTypesV2Respon from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) @@ -626,7 +624,7 @@ from foundry.models.list_ontologies_v2_response import ListOntologiesV2Response from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") try: @@ -680,7 +678,7 @@ from foundry.models.list_outgoing_link_types_response_v2 import ListOutgoingLink from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. object_type = 'Flight' # str | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. @@ -743,7 +741,7 @@ from foundry.models.list_query_types_response_v2 import ListQueryTypesResponseV2 from foundry.rest import ApiException from pprint import pprint -foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth()) +foundry_client = foundry.FoundryClient(auth=foundry.UserTokenAuth(...), hostname="example.palantirfoundry.com") ontology = 'palantir' # str | The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. page_size = 56 # int | The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. (optional) diff --git a/docs/OntologyEditsExceededLimit.md b/docs/OntologyEditsExceededLimit.md deleted file mode 100644 index 8736740d0..000000000 --- a/docs/OntologyEditsExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# OntologyEditsExceededLimit - -The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**OntologyEditsExceededLimitParameters**](OntologyEditsExceededLimitParameters.md) | | - -## Example - -```python -from foundry.models import OntologyEditsExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of OntologyEditsExceededLimit from a JSON string -ontology_edits_exceeded_limit_instance = OntologyEditsExceededLimit.from_json(json) -# print the JSON string representation of the object -print(OntologyEditsExceededLimit.to_json()) - -# convert the object into a dict -ontology_edits_exceeded_limit_dict = ontology_edits_exceeded_limit_instance.to_dict() -# create an instance of OntologyEditsExceededLimit from a dict -ontology_edits_exceeded_limit_form_dict = ontology_edits_exceeded_limit.from_dict(ontology_edits_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OntologyEditsExceededLimitParameters.md b/docs/OntologyEditsExceededLimitParameters.md deleted file mode 100644 index 899f12149..000000000 --- a/docs/OntologyEditsExceededLimitParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# OntologyEditsExceededLimitParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**edits_count** | **int** | | -**edits_limit** | **int** | | - -## Example - -```python -from foundry.models import OntologyEditsExceededLimitParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of OntologyEditsExceededLimitParameters from a JSON string -ontology_edits_exceeded_limit_parameters_instance = OntologyEditsExceededLimitParameters.from_json(json) -# print the JSON string representation of the object -print(OntologyEditsExceededLimitParameters.to_json()) - -# convert the object into a dict -ontology_edits_exceeded_limit_parameters_dict = ontology_edits_exceeded_limit_parameters_instance.to_dict() -# create an instance of OntologyEditsExceededLimitParameters from a dict -ontology_edits_exceeded_limit_parameters_form_dict = ontology_edits_exceeded_limit_parameters.from_dict(ontology_edits_exceeded_limit_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OntologyNotFound.md b/docs/OntologyNotFound.md deleted file mode 100644 index 969867580..000000000 --- a/docs/OntologyNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# OntologyNotFound - -The requested Ontology is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**OntologyNotFoundParameters**](OntologyNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import OntologyNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of OntologyNotFound from a JSON string -ontology_not_found_instance = OntologyNotFound.from_json(json) -# print the JSON string representation of the object -print(OntologyNotFound.to_json()) - -# convert the object into a dict -ontology_not_found_dict = ontology_not_found_instance.to_dict() -# create an instance of OntologyNotFound from a dict -ontology_not_found_form_dict = ontology_not_found.from_dict(ontology_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OntologyNotFoundParameters.md b/docs/OntologyNotFoundParameters.md deleted file mode 100644 index 1601fb9e2..000000000 --- a/docs/OntologyNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# OntologyNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_name** | **str** | | \[optional\] -**ontology_rid** | **str** | The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the \`List ontologies\` endpoint or check the **Ontology Manager**. | \[optional\] - -## Example - -```python -from foundry.models import OntologyNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of OntologyNotFoundParameters from a JSON string -ontology_not_found_parameters_instance = OntologyNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(OntologyNotFoundParameters.to_json()) - -# convert the object into a dict -ontology_not_found_parameters_dict = ontology_not_found_parameters_instance.to_dict() -# create an instance of OntologyNotFoundParameters from a dict -ontology_not_found_parameters_form_dict = ontology_not_found_parameters.from_dict(ontology_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OntologySyncing.md b/docs/OntologySyncing.md deleted file mode 100644 index 52cca9569..000000000 --- a/docs/OntologySyncing.md +++ /dev/null @@ -1,32 +0,0 @@ -# OntologySyncing - -The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ObjectTypeNotSyncedParameters**](ObjectTypeNotSyncedParameters.md) | | - -## Example - -```python -from foundry.models import OntologySyncing - -# TODO update the JSON string below -json = "{}" -# create an instance of OntologySyncing from a JSON string -ontology_syncing_instance = OntologySyncing.from_json(json) -# print the JSON string representation of the object -print(OntologySyncing.to_json()) - -# convert the object into a dict -ontology_syncing_dict = ontology_syncing_instance.to_dict() -# create an instance of OntologySyncing from a dict -ontology_syncing_form_dict = ontology_syncing.from_dict(ontology_syncing_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OpenTransactionAlreadyExists.md b/docs/OpenTransactionAlreadyExists.md deleted file mode 100644 index df3f40039..000000000 --- a/docs/OpenTransactionAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# OpenTransactionAlreadyExists - -A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import OpenTransactionAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of OpenTransactionAlreadyExists from a JSON string -open_transaction_already_exists_instance = OpenTransactionAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(OpenTransactionAlreadyExists.to_json()) - -# convert the object into a dict -open_transaction_already_exists_dict = open_transaction_already_exists_instance.to_dict() -# create an instance of OpenTransactionAlreadyExists from a dict -open_transaction_already_exists_form_dict = open_transaction_already_exists.from_dict(open_transaction_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OperationNotFound.md b/docs/OperationNotFound.md deleted file mode 100644 index 077a7d963..000000000 --- a/docs/OperationNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# OperationNotFound - -The operation is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**OperationNotFoundParameters**](OperationNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import OperationNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of OperationNotFound from a JSON string -operation_not_found_instance = OperationNotFound.from_json(json) -# print the JSON string representation of the object -print(OperationNotFound.to_json()) - -# convert the object into a dict -operation_not_found_dict = operation_not_found_instance.to_dict() -# create an instance of OperationNotFound from a dict -operation_not_found_form_dict = operation_not_found.from_dict(operation_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/OperationNotFoundParameters.md b/docs/OperationNotFoundParameters.md deleted file mode 100644 index bf9cc5da9..000000000 --- a/docs/OperationNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# OperationNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | - -## Example - -```python -from foundry.models import OperationNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of OperationNotFoundParameters from a JSON string -operation_not_found_parameters_instance = OperationNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(OperationNotFoundParameters.to_json()) - -# convert the object into a dict -operation_not_found_parameters_dict = operation_not_found_parameters_instance.to_dict() -# create an instance of OperationNotFoundParameters from a dict -operation_not_found_parameters_form_dict = operation_not_found_parameters.from_dict(operation_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterObjectNotFound.md b/docs/ParameterObjectNotFound.md deleted file mode 100644 index 0202a663b..000000000 --- a/docs/ParameterObjectNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ParameterObjectNotFound - -The parameter object reference or parameter default value is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ParameterObjectNotFoundParameters**](ParameterObjectNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ParameterObjectNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterObjectNotFound from a JSON string -parameter_object_not_found_instance = ParameterObjectNotFound.from_json(json) -# print the JSON string representation of the object -print(ParameterObjectNotFound.to_json()) - -# convert the object into a dict -parameter_object_not_found_dict = parameter_object_not_found_instance.to_dict() -# create an instance of ParameterObjectNotFound from a dict -parameter_object_not_found_form_dict = parameter_object_not_found.from_dict(parameter_object_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterObjectNotFoundParameters.md b/docs/ParameterObjectNotFoundParameters.md deleted file mode 100644 index 2a67fd98f..000000000 --- a/docs/ParameterObjectNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ParameterObjectNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**primary_key** | **Dict\[str, object\]** | | \[optional\] - -## Example - -```python -from foundry.models import ParameterObjectNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterObjectNotFoundParameters from a JSON string -parameter_object_not_found_parameters_instance = ParameterObjectNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ParameterObjectNotFoundParameters.to_json()) - -# convert the object into a dict -parameter_object_not_found_parameters_dict = parameter_object_not_found_parameters_instance.to_dict() -# create an instance of ParameterObjectNotFoundParameters from a dict -parameter_object_not_found_parameters_form_dict = parameter_object_not_found_parameters.from_dict(parameter_object_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterObjectSetRidNotFound.md b/docs/ParameterObjectSetRidNotFound.md deleted file mode 100644 index cb00d448d..000000000 --- a/docs/ParameterObjectSetRidNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ParameterObjectSetRidNotFound - -The parameter object set RID is not found, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ParameterObjectSetRidNotFoundParameters**](ParameterObjectSetRidNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ParameterObjectSetRidNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterObjectSetRidNotFound from a JSON string -parameter_object_set_rid_not_found_instance = ParameterObjectSetRidNotFound.from_json(json) -# print the JSON string representation of the object -print(ParameterObjectSetRidNotFound.to_json()) - -# convert the object into a dict -parameter_object_set_rid_not_found_dict = parameter_object_set_rid_not_found_instance.to_dict() -# create an instance of ParameterObjectSetRidNotFound from a dict -parameter_object_set_rid_not_found_form_dict = parameter_object_set_rid_not_found.from_dict(parameter_object_set_rid_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterObjectSetRidNotFoundParameters.md b/docs/ParameterObjectSetRidNotFoundParameters.md deleted file mode 100644 index 34c9c7202..000000000 --- a/docs/ParameterObjectSetRidNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# ParameterObjectSetRidNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_set_rid** | **str** | | - -## Example - -```python -from foundry.models import ParameterObjectSetRidNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterObjectSetRidNotFoundParameters from a JSON string -parameter_object_set_rid_not_found_parameters_instance = ParameterObjectSetRidNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ParameterObjectSetRidNotFoundParameters.to_json()) - -# convert the object into a dict -parameter_object_set_rid_not_found_parameters_dict = parameter_object_set_rid_not_found_parameters_instance.to_dict() -# create an instance of ParameterObjectSetRidNotFoundParameters from a dict -parameter_object_set_rid_not_found_parameters_form_dict = parameter_object_set_rid_not_found_parameters.from_dict(parameter_object_set_rid_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterTypeNotSupported.md b/docs/ParameterTypeNotSupported.md deleted file mode 100644 index b2baf11bd..000000000 --- a/docs/ParameterTypeNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# ParameterTypeNotSupported - -The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ParameterTypeNotSupportedParameters**](ParameterTypeNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import ParameterTypeNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterTypeNotSupported from a JSON string -parameter_type_not_supported_instance = ParameterTypeNotSupported.from_json(json) -# print the JSON string representation of the object -print(ParameterTypeNotSupported.to_json()) - -# convert the object into a dict -parameter_type_not_supported_dict = parameter_type_not_supported_instance.to_dict() -# create an instance of ParameterTypeNotSupported from a dict -parameter_type_not_supported_form_dict = parameter_type_not_supported.from_dict(parameter_type_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParameterTypeNotSupportedParameters.md b/docs/ParameterTypeNotSupportedParameters.md deleted file mode 100644 index dcfd6f447..000000000 --- a/docs/ParameterTypeNotSupportedParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ParameterTypeNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameter_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | -**parameter_id** | **str** | The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. | - -## Example - -```python -from foundry.models import ParameterTypeNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ParameterTypeNotSupportedParameters from a JSON string -parameter_type_not_supported_parameters_instance = ParameterTypeNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(ParameterTypeNotSupportedParameters.to_json()) - -# convert the object into a dict -parameter_type_not_supported_parameters_dict = parameter_type_not_supported_parameters_instance.to_dict() -# create an instance of ParameterTypeNotSupportedParameters from a dict -parameter_type_not_supported_parameters_form_dict = parameter_type_not_supported_parameters.from_dict(parameter_type_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParametersNotFound.md b/docs/ParametersNotFound.md deleted file mode 100644 index 493a7152c..000000000 --- a/docs/ParametersNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# ParametersNotFound - -The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ParametersNotFoundParameters**](ParametersNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import ParametersNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of ParametersNotFound from a JSON string -parameters_not_found_instance = ParametersNotFound.from_json(json) -# print the JSON string representation of the object -print(ParametersNotFound.to_json()) - -# convert the object into a dict -parameters_not_found_dict = parameters_not_found_instance.to_dict() -# create an instance of ParametersNotFound from a dict -parameters_not_found_form_dict = parameters_not_found.from_dict(parameters_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParametersNotFoundParameters.md b/docs/ParametersNotFoundParameters.md deleted file mode 100644 index a7e0471ea..000000000 --- a/docs/ParametersNotFoundParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# ParametersNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action_type** | **str** | The name of the action type in the API. To find the API name for your Action Type, use the \`List action types\` endpoint or check the **Ontology Manager**. | -**configured_parameter_ids** | **List\[str\]** | | \[optional\] -**unknown_parameter_ids** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import ParametersNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ParametersNotFoundParameters from a JSON string -parameters_not_found_parameters_instance = ParametersNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(ParametersNotFoundParameters.to_json()) - -# convert the object into a dict -parameters_not_found_parameters_dict = parameters_not_found_parameters_instance.to_dict() -# create an instance of ParametersNotFoundParameters from a dict -parameters_not_found_parameters_form_dict = parameters_not_found_parameters.from_dict(parameters_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ParentAttachmentPermissionDenied.md b/docs/ParentAttachmentPermissionDenied.md deleted file mode 100644 index ba65c3f8b..000000000 --- a/docs/ParentAttachmentPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# ParentAttachmentPermissionDenied - -The user does not have permission to parent attachments. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import ParentAttachmentPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of ParentAttachmentPermissionDenied from a JSON string -parent_attachment_permission_denied_instance = ParentAttachmentPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(ParentAttachmentPermissionDenied.to_json()) - -# convert the object into a dict -parent_attachment_permission_denied_dict = parent_attachment_permission_denied_instance.to_dict() -# create an instance of ParentAttachmentPermissionDenied from a dict -parent_attachment_permission_denied_form_dict = parent_attachment_permission_denied.from_dict(parent_attachment_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotFilterable.md b/docs/PropertiesNotFilterable.md deleted file mode 100644 index 7126d19fd..000000000 --- a/docs/PropertiesNotFilterable.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertiesNotFilterable - -Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DuplicateOrderByParameters**](DuplicateOrderByParameters.md) | | - -## Example - -```python -from foundry.models import PropertiesNotFilterable - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotFilterable from a JSON string -properties_not_filterable_instance = PropertiesNotFilterable.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotFilterable.to_json()) - -# convert the object into a dict -properties_not_filterable_dict = properties_not_filterable_instance.to_dict() -# create an instance of PropertiesNotFilterable from a dict -properties_not_filterable_form_dict = properties_not_filterable.from_dict(properties_not_filterable_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotFound.md b/docs/PropertiesNotFound.md deleted file mode 100644 index 3efb439f3..000000000 --- a/docs/PropertiesNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertiesNotFound - -The requested properties are not found on the object type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**PropertiesNotFoundParameters**](PropertiesNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import PropertiesNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotFound from a JSON string -properties_not_found_instance = PropertiesNotFound.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotFound.to_json()) - -# convert the object into a dict -properties_not_found_dict = properties_not_found_instance.to_dict() -# create an instance of PropertiesNotFound from a dict -properties_not_found_form_dict = properties_not_found.from_dict(properties_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotFoundParameters.md b/docs/PropertiesNotFoundParameters.md deleted file mode 100644 index d3bc55a50..000000000 --- a/docs/PropertiesNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# PropertiesNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**object_type** | **str** | The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the \`List object types\` endpoint or check the **Ontology Manager**. | -**properties** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import PropertiesNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotFoundParameters from a JSON string -properties_not_found_parameters_instance = PropertiesNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotFoundParameters.to_json()) - -# convert the object into a dict -properties_not_found_parameters_dict = properties_not_found_parameters_instance.to_dict() -# create an instance of PropertiesNotFoundParameters from a dict -properties_not_found_parameters_form_dict = properties_not_found_parameters.from_dict(properties_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotSearchable.md b/docs/PropertiesNotSearchable.md deleted file mode 100644 index 838434cca..000000000 --- a/docs/PropertiesNotSearchable.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertiesNotSearchable - -Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**PropertiesNotSearchableParameters**](PropertiesNotSearchableParameters.md) | | - -## Example - -```python -from foundry.models import PropertiesNotSearchable - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotSearchable from a JSON string -properties_not_searchable_instance = PropertiesNotSearchable.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotSearchable.to_json()) - -# convert the object into a dict -properties_not_searchable_dict = properties_not_searchable_instance.to_dict() -# create an instance of PropertiesNotSearchable from a dict -properties_not_searchable_form_dict = properties_not_searchable.from_dict(properties_not_searchable_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotSearchableParameters.md b/docs/PropertiesNotSearchableParameters.md deleted file mode 100644 index 5eb8b3569..000000000 --- a/docs/PropertiesNotSearchableParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# PropertiesNotSearchableParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**property_api_names** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import PropertiesNotSearchableParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotSearchableParameters from a JSON string -properties_not_searchable_parameters_instance = PropertiesNotSearchableParameters.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotSearchableParameters.to_json()) - -# convert the object into a dict -properties_not_searchable_parameters_dict = properties_not_searchable_parameters_instance.to_dict() -# create an instance of PropertiesNotSearchableParameters from a dict -properties_not_searchable_parameters_form_dict = properties_not_searchable_parameters.from_dict(properties_not_searchable_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertiesNotSortable.md b/docs/PropertiesNotSortable.md deleted file mode 100644 index c8313d0f4..000000000 --- a/docs/PropertiesNotSortable.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertiesNotSortable - -Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DuplicateOrderByParameters**](DuplicateOrderByParameters.md) | | - -## Example - -```python -from foundry.models import PropertiesNotSortable - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertiesNotSortable from a JSON string -properties_not_sortable_instance = PropertiesNotSortable.from_json(json) -# print the JSON string representation of the object -print(PropertiesNotSortable.to_json()) - -# convert the object into a dict -properties_not_sortable_dict = properties_not_sortable_instance.to_dict() -# create an instance of PropertiesNotSortable from a dict -properties_not_sortable_form_dict = properties_not_sortable.from_dict(properties_not_sortable_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyApiNameNotFound.md b/docs/PropertyApiNameNotFound.md deleted file mode 100644 index 3b114d2d1..000000000 --- a/docs/PropertyApiNameNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertyApiNameNotFound - -A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**PropertyApiNameNotFoundParameters**](PropertyApiNameNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import PropertyApiNameNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyApiNameNotFound from a JSON string -property_api_name_not_found_instance = PropertyApiNameNotFound.from_json(json) -# print the JSON string representation of the object -print(PropertyApiNameNotFound.to_json()) - -# convert the object into a dict -property_api_name_not_found_dict = property_api_name_not_found_instance.to_dict() -# create an instance of PropertyApiNameNotFound from a dict -property_api_name_not_found_form_dict = property_api_name_not_found.from_dict(property_api_name_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyApiNameNotFoundParameters.md b/docs/PropertyApiNameNotFoundParameters.md deleted file mode 100644 index 567e74388..000000000 --- a/docs/PropertyApiNameNotFoundParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# PropertyApiNameNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**property_base_type** | **str** | A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | \`Array\\`, where \`T\` is the type of the array elements, e.g. \`Array\\`. | | Attachment | \`Attachment\` | | Boolean | \`Boolean\` | | Byte | \`Byte\` | | Date | \`LocalDate\` | | Decimal | \`Decimal\` | | Double | \`Double\` | | Float | \`Float\` | | Integer | \`Integer\` | | Long | \`Long\` | | OntologyObject | \`OntologyObject\\` where \`T\` is the API name of the referenced object type. | | Short | \`Short\` | | String | \`String\` | | Struct | \`Struct\\` where \`T\` contains field name and type pairs, e.g. \`Struct\<{ firstName: String, lastName: string }>\` | | Timeseries | \`TimeSeries\\` where \`T\` is either \`String\` for an enum series or \`Double\` for a numeric series. | | Timestamp | \`Timestamp\` | | -**property_id** | **str** | The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. | - -## Example - -```python -from foundry.models import PropertyApiNameNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyApiNameNotFoundParameters from a JSON string -property_api_name_not_found_parameters_instance = PropertyApiNameNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(PropertyApiNameNotFoundParameters.to_json()) - -# convert the object into a dict -property_api_name_not_found_parameters_dict = property_api_name_not_found_parameters_instance.to_dict() -# create an instance of PropertyApiNameNotFoundParameters from a dict -property_api_name_not_found_parameters_form_dict = property_api_name_not_found_parameters.from_dict(property_api_name_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyBaseTypeNotSupported.md b/docs/PropertyBaseTypeNotSupported.md deleted file mode 100644 index 4768b56dd..000000000 --- a/docs/PropertyBaseTypeNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertyBaseTypeNotSupported - -The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidAggregationRangePropertyTypeParameters**](InvalidAggregationRangePropertyTypeParameters.md) | | - -## Example - -```python -from foundry.models import PropertyBaseTypeNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyBaseTypeNotSupported from a JSON string -property_base_type_not_supported_instance = PropertyBaseTypeNotSupported.from_json(json) -# print the JSON string representation of the object -print(PropertyBaseTypeNotSupported.to_json()) - -# convert the object into a dict -property_base_type_not_supported_dict = property_base_type_not_supported_instance.to_dict() -# create an instance of PropertyBaseTypeNotSupported from a dict -property_base_type_not_supported_form_dict = property_base_type_not_supported.from_dict(property_base_type_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyFiltersNotSupported.md b/docs/PropertyFiltersNotSupported.md deleted file mode 100644 index 24a292b5f..000000000 --- a/docs/PropertyFiltersNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertyFiltersNotSupported - -At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**InvalidPropertyFiltersCombinationParameters**](InvalidPropertyFiltersCombinationParameters.md) | | - -## Example - -```python -from foundry.models import PropertyFiltersNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyFiltersNotSupported from a JSON string -property_filters_not_supported_instance = PropertyFiltersNotSupported.from_json(json) -# print the JSON string representation of the object -print(PropertyFiltersNotSupported.to_json()) - -# convert the object into a dict -property_filters_not_supported_dict = property_filters_not_supported_instance.to_dict() -# create an instance of PropertyFiltersNotSupported from a dict -property_filters_not_supported_form_dict = property_filters_not_supported.from_dict(property_filters_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyTypesSearchNotSupported.md b/docs/PropertyTypesSearchNotSupported.md deleted file mode 100644 index 0fc9d5119..000000000 --- a/docs/PropertyTypesSearchNotSupported.md +++ /dev/null @@ -1,32 +0,0 @@ -# PropertyTypesSearchNotSupported - -The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**PropertyTypesSearchNotSupportedParameters**](PropertyTypesSearchNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import PropertyTypesSearchNotSupported - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyTypesSearchNotSupported from a JSON string -property_types_search_not_supported_instance = PropertyTypesSearchNotSupported.from_json(json) -# print the JSON string representation of the object -print(PropertyTypesSearchNotSupported.to_json()) - -# convert the object into a dict -property_types_search_not_supported_dict = property_types_search_not_supported_instance.to_dict() -# create an instance of PropertyTypesSearchNotSupported from a dict -property_types_search_not_supported_form_dict = property_types_search_not_supported.from_dict(property_types_search_not_supported_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PropertyTypesSearchNotSupportedParameters.md b/docs/PropertyTypesSearchNotSupportedParameters.md deleted file mode 100644 index 7a229bbe2..000000000 --- a/docs/PropertyTypesSearchNotSupportedParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# PropertyTypesSearchNotSupportedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parameters** | **Dict\[str, List\[str\]\]** | | \[optional\] - -## Example - -```python -from foundry.models import PropertyTypesSearchNotSupportedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of PropertyTypesSearchNotSupportedParameters from a JSON string -property_types_search_not_supported_parameters_instance = PropertyTypesSearchNotSupportedParameters.from_json(json) -# print the JSON string representation of the object -print(PropertyTypesSearchNotSupportedParameters.to_json()) - -# convert the object into a dict -property_types_search_not_supported_parameters_dict = property_types_search_not_supported_parameters_instance.to_dict() -# create an instance of PropertyTypesSearchNotSupportedParameters from a dict -property_types_search_not_supported_parameters_form_dict = property_types_search_not_supported_parameters.from_dict(property_types_search_not_supported_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/PutSchemaPermissionDenied.md b/docs/PutSchemaPermissionDenied.md deleted file mode 100644 index d4a071573..000000000 --- a/docs/PutSchemaPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# PutSchemaPermissionDenied - -todo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**BranchAlreadyExistsParameters**](BranchAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import PutSchemaPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of PutSchemaPermissionDenied from a JSON string -put_schema_permission_denied_instance = PutSchemaPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(PutSchemaPermissionDenied.to_json()) - -# convert the object into a dict -put_schema_permission_denied_dict = put_schema_permission_denied_instance.to_dict() -# create an instance of PutSchemaPermissionDenied from a dict -put_schema_permission_denied_form_dict = put_schema_permission_denied.from_dict(put_schema_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/QueryEncounteredUserFacingError.md b/docs/QueryEncounteredUserFacingError.md deleted file mode 100644 index c5423232f..000000000 --- a/docs/QueryEncounteredUserFacingError.md +++ /dev/null @@ -1,32 +0,0 @@ -# QueryEncounteredUserFacingError - -The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionEncounteredUserFacingErrorParameters**](FunctionEncounteredUserFacingErrorParameters.md) | | - -## Example - -```python -from foundry.models import QueryEncounteredUserFacingError - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryEncounteredUserFacingError from a JSON string -query_encountered_user_facing_error_instance = QueryEncounteredUserFacingError.from_json(json) -# print the JSON string representation of the object -print(QueryEncounteredUserFacingError.to_json()) - -# convert the object into a dict -query_encountered_user_facing_error_dict = query_encountered_user_facing_error_instance.to_dict() -# create an instance of QueryEncounteredUserFacingError from a dict -query_encountered_user_facing_error_form_dict = query_encountered_user_facing_error.from_dict(query_encountered_user_facing_error_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/QueryMemoryExceededLimit.md b/docs/QueryMemoryExceededLimit.md deleted file mode 100644 index 3aff8b46d..000000000 --- a/docs/QueryMemoryExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# QueryMemoryExceededLimit - -Memory limits were exceeded for the `Query` execution. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionExecutionFailedParameters**](FunctionExecutionFailedParameters.md) | | - -## Example - -```python -from foundry.models import QueryMemoryExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryMemoryExceededLimit from a JSON string -query_memory_exceeded_limit_instance = QueryMemoryExceededLimit.from_json(json) -# print the JSON string representation of the object -print(QueryMemoryExceededLimit.to_json()) - -# convert the object into a dict -query_memory_exceeded_limit_dict = query_memory_exceeded_limit_instance.to_dict() -# create an instance of QueryMemoryExceededLimit from a dict -query_memory_exceeded_limit_form_dict = query_memory_exceeded_limit.from_dict(query_memory_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/QueryNotFound.md b/docs/QueryNotFound.md deleted file mode 100644 index c4a618a5e..000000000 --- a/docs/QueryNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# QueryNotFound - -The query is not found, or the user does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**QueryNotFoundParameters**](QueryNotFoundParameters.md) | | - -## Example - -```python -from foundry.models import QueryNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryNotFound from a JSON string -query_not_found_instance = QueryNotFound.from_json(json) -# print the JSON string representation of the object -print(QueryNotFound.to_json()) - -# convert the object into a dict -query_not_found_dict = query_not_found_instance.to_dict() -# create an instance of QueryNotFound from a dict -query_not_found_form_dict = query_not_found.from_dict(query_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/QueryNotFoundParameters.md b/docs/QueryNotFoundParameters.md deleted file mode 100644 index 451948452..000000000 --- a/docs/QueryNotFoundParameters.md +++ /dev/null @@ -1,27 +0,0 @@ -# QueryNotFoundParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**query** | **str** | The name of the Query in the API. | - -## Example - -```python -from foundry.models import QueryNotFoundParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryNotFoundParameters from a JSON string -query_not_found_parameters_instance = QueryNotFoundParameters.from_json(json) -# print the JSON string representation of the object -print(QueryNotFoundParameters.to_json()) - -# convert the object into a dict -query_not_found_parameters_dict = query_not_found_parameters_instance.to_dict() -# create an instance of QueryNotFoundParameters from a dict -query_not_found_parameters_form_dict = query_not_found_parameters.from_dict(query_not_found_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/QueryTimeExceededLimit.md b/docs/QueryTimeExceededLimit.md deleted file mode 100644 index e91bb2e4d..000000000 --- a/docs/QueryTimeExceededLimit.md +++ /dev/null @@ -1,32 +0,0 @@ -# QueryTimeExceededLimit - -Time limits were exceeded for the `Query` execution. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FunctionExecutionFailedParameters**](FunctionExecutionFailedParameters.md) | | - -## Example - -```python -from foundry.models import QueryTimeExceededLimit - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryTimeExceededLimit from a JSON string -query_time_exceeded_limit_instance = QueryTimeExceededLimit.from_json(json) -# print the JSON string representation of the object -print(QueryTimeExceededLimit.to_json()) - -# convert the object into a dict -query_time_exceeded_limit_dict = query_time_exceeded_limit_instance.to_dict() -# create an instance of QueryTimeExceededLimit from a dict -query_time_exceeded_limit_form_dict = query_time_exceeded_limit.from_dict(query_time_exceeded_limit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ReadTablePermissionDenied.md b/docs/ReadTablePermissionDenied.md deleted file mode 100644 index b04dda9a0..000000000 --- a/docs/ReadTablePermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# ReadTablePermissionDenied - -The provided token does not have permission to read the given dataset as a table. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ColumnTypesNotSupportedParameters**](ColumnTypesNotSupportedParameters.md) | | - -## Example - -```python -from foundry.models import ReadTablePermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of ReadTablePermissionDenied from a JSON string -read_table_permission_denied_instance = ReadTablePermissionDenied.from_json(json) -# print the JSON string representation of the object -print(ReadTablePermissionDenied.to_json()) - -# convert the object into a dict -read_table_permission_denied_dict = read_table_permission_denied_instance.to_dict() -# create an instance of ReadTablePermissionDenied from a dict -read_table_permission_denied_form_dict = read_table_permission_denied.from_dict(read_table_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ResourceNameAlreadyExists.md b/docs/ResourceNameAlreadyExists.md deleted file mode 100644 index 57e30db38..000000000 --- a/docs/ResourceNameAlreadyExists.md +++ /dev/null @@ -1,32 +0,0 @@ -# ResourceNameAlreadyExists - -The provided resource name is already in use by another resource in the same folder. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ResourceNameAlreadyExistsParameters**](ResourceNameAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import ResourceNameAlreadyExists - -# TODO update the JSON string below -json = "{}" -# create an instance of ResourceNameAlreadyExists from a JSON string -resource_name_already_exists_instance = ResourceNameAlreadyExists.from_json(json) -# print the JSON string representation of the object -print(ResourceNameAlreadyExists.to_json()) - -# convert the object into a dict -resource_name_already_exists_dict = resource_name_already_exists_instance.to_dict() -# create an instance of ResourceNameAlreadyExists from a dict -resource_name_already_exists_form_dict = resource_name_already_exists.from_dict(resource_name_already_exists_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ResourceNameAlreadyExistsParameters.md b/docs/ResourceNameAlreadyExistsParameters.md deleted file mode 100644 index 482ff4fb6..000000000 --- a/docs/ResourceNameAlreadyExistsParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# ResourceNameAlreadyExistsParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**parent_folder_rid** | **str** | | -**resource_name** | **str** | | - -## Example - -```python -from foundry.models import ResourceNameAlreadyExistsParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of ResourceNameAlreadyExistsParameters from a JSON string -resource_name_already_exists_parameters_instance = ResourceNameAlreadyExistsParameters.from_json(json) -# print the JSON string representation of the object -print(ResourceNameAlreadyExistsParameters.to_json()) - -# convert the object into a dict -resource_name_already_exists_parameters_dict = resource_name_already_exists_parameters_instance.to_dict() -# create an instance of ResourceNameAlreadyExistsParameters from a dict -resource_name_already_exists_parameters_form_dict = resource_name_already_exists_parameters.from_dict(resource_name_already_exists_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ReturnEditsMode.md b/docs/ReturnEditsMode.md deleted file mode 100644 index 0d8e57863..000000000 --- a/docs/ReturnEditsMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# ReturnEditsMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -**ALL** | 'ALL' | | -**NONE** | 'NONE' | | - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/SchemaNotFound.md b/docs/SchemaNotFound.md deleted file mode 100644 index d2e83429d..000000000 --- a/docs/SchemaNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# SchemaNotFound - -A schema could not be found for the given dataset and branch, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**DeleteSchemaPermissionDeniedParameters**](DeleteSchemaPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import SchemaNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of SchemaNotFound from a JSON string -schema_not_found_instance = SchemaNotFound.from_json(json) -# print the JSON string representation of the object -print(SchemaNotFound.to_json()) - -# convert the object into a dict -schema_not_found_dict = schema_not_found_instance.to_dict() -# create an instance of SchemaNotFound from a dict -schema_not_found_form_dict = schema_not_found.from_dict(schema_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/TransactionNotCommitted.md b/docs/TransactionNotCommitted.md deleted file mode 100644 index a41892bcd..000000000 --- a/docs/TransactionNotCommitted.md +++ /dev/null @@ -1,32 +0,0 @@ -# TransactionNotCommitted - -The given transaction has not been committed. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**TransactionNotCommittedParameters**](TransactionNotCommittedParameters.md) | | - -## Example - -```python -from foundry.models import TransactionNotCommitted - -# TODO update the JSON string below -json = "{}" -# create an instance of TransactionNotCommitted from a JSON string -transaction_not_committed_instance = TransactionNotCommitted.from_json(json) -# print the JSON string representation of the object -print(TransactionNotCommitted.to_json()) - -# convert the object into a dict -transaction_not_committed_dict = transaction_not_committed_instance.to_dict() -# create an instance of TransactionNotCommitted from a dict -transaction_not_committed_form_dict = transaction_not_committed.from_dict(transaction_not_committed_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/TransactionNotCommittedParameters.md b/docs/TransactionNotCommittedParameters.md deleted file mode 100644 index ca55fe7d5..000000000 --- a/docs/TransactionNotCommittedParameters.md +++ /dev/null @@ -1,29 +0,0 @@ -# TransactionNotCommittedParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset_rid** | **str** | The Resource Identifier (RID) of a Dataset. Example: \`ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da\`. | -**transaction_rid** | **str** | The Resource Identifier (RID) of a Transaction. Example: \`ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4\`. | -**transaction_status** | [**TransactionStatus**](TransactionStatus.md) | | - -## Example - -```python -from foundry.models import TransactionNotCommittedParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of TransactionNotCommittedParameters from a JSON string -transaction_not_committed_parameters_instance = TransactionNotCommittedParameters.from_json(json) -# print the JSON string representation of the object -print(TransactionNotCommittedParameters.to_json()) - -# convert the object into a dict -transaction_not_committed_parameters_dict = transaction_not_committed_parameters_instance.to_dict() -# create an instance of TransactionNotCommittedParameters from a dict -transaction_not_committed_parameters_form_dict = transaction_not_committed_parameters.from_dict(transaction_not_committed_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/TransactionNotFound.md b/docs/TransactionNotFound.md deleted file mode 100644 index bc8a4ea83..000000000 --- a/docs/TransactionNotFound.md +++ /dev/null @@ -1,32 +0,0 @@ -# TransactionNotFound - -The requested transaction could not be found on the dataset, or the client token does not have access to it. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**AbortTransactionPermissionDeniedParameters**](AbortTransactionPermissionDeniedParameters.md) | | - -## Example - -```python -from foundry.models import TransactionNotFound - -# TODO update the JSON string below -json = "{}" -# create an instance of TransactionNotFound from a JSON string -transaction_not_found_instance = TransactionNotFound.from_json(json) -# print the JSON string representation of the object -print(TransactionNotFound.to_json()) - -# convert the object into a dict -transaction_not_found_dict = transaction_not_found_instance.to_dict() -# create an instance of TransactionNotFound from a dict -transaction_not_found_form_dict = transaction_not_found.from_dict(transaction_not_found_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/TransactionNotOpen.md b/docs/TransactionNotOpen.md deleted file mode 100644 index 03ffdada8..000000000 --- a/docs/TransactionNotOpen.md +++ /dev/null @@ -1,32 +0,0 @@ -# TransactionNotOpen - -The given transaction is not open. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**TransactionNotCommittedParameters**](TransactionNotCommittedParameters.md) | | - -## Example - -```python -from foundry.models import TransactionNotOpen - -# TODO update the JSON string below -json = "{}" -# create an instance of TransactionNotOpen from a JSON string -transaction_not_open_instance = TransactionNotOpen.from_json(json) -# print the JSON string representation of the object -print(TransactionNotOpen.to_json()) - -# convert the object into a dict -transaction_not_open_dict = transaction_not_open_instance.to_dict() -# create an instance of TransactionNotOpen from a dict -transaction_not_open_form_dict = transaction_not_open.from_dict(transaction_not_open_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UnknownDistanceUnit.md b/docs/UnknownDistanceUnit.md deleted file mode 100644 index 66a63ec63..000000000 --- a/docs/UnknownDistanceUnit.md +++ /dev/null @@ -1,32 +0,0 @@ -# UnknownDistanceUnit - -An unknown distance unit was provided. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**UnknownDistanceUnitParameters**](UnknownDistanceUnitParameters.md) | | - -## Example - -```python -from foundry.models import UnknownDistanceUnit - -# TODO update the JSON string below -json = "{}" -# create an instance of UnknownDistanceUnit from a JSON string -unknown_distance_unit_instance = UnknownDistanceUnit.from_json(json) -# print the JSON string representation of the object -print(UnknownDistanceUnit.to_json()) - -# convert the object into a dict -unknown_distance_unit_dict = unknown_distance_unit_instance.to_dict() -# create an instance of UnknownDistanceUnit from a dict -unknown_distance_unit_form_dict = unknown_distance_unit.from_dict(unknown_distance_unit_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UnknownDistanceUnitParameters.md b/docs/UnknownDistanceUnitParameters.md deleted file mode 100644 index 0a2a6af4e..000000000 --- a/docs/UnknownDistanceUnitParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# UnknownDistanceUnitParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**known_units** | [**List\[DistanceUnit\]**](DistanceUnit.md) | | \[optional\] -**unknown_unit** | **str** | | - -## Example - -```python -from foundry.models import UnknownDistanceUnitParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of UnknownDistanceUnitParameters from a JSON string -unknown_distance_unit_parameters_instance = UnknownDistanceUnitParameters.from_json(json) -# print the JSON string representation of the object -print(UnknownDistanceUnitParameters.to_json()) - -# convert the object into a dict -unknown_distance_unit_parameters_dict = unknown_distance_unit_parameters_instance.to_dict() -# create an instance of UnknownDistanceUnitParameters from a dict -unknown_distance_unit_parameters_form_dict = unknown_distance_unit_parameters.from_dict(unknown_distance_unit_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UnknownParameter.md b/docs/UnknownParameter.md deleted file mode 100644 index 994a89c80..000000000 --- a/docs/UnknownParameter.md +++ /dev/null @@ -1,32 +0,0 @@ -# UnknownParameter - -The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**UnknownParameterParameters**](UnknownParameterParameters.md) | | - -## Example - -```python -from foundry.models import UnknownParameter - -# TODO update the JSON string below -json = "{}" -# create an instance of UnknownParameter from a JSON string -unknown_parameter_instance = UnknownParameter.from_json(json) -# print the JSON string representation of the object -print(UnknownParameter.to_json()) - -# convert the object into a dict -unknown_parameter_dict = unknown_parameter_instance.to_dict() -# create an instance of UnknownParameter from a dict -unknown_parameter_form_dict = unknown_parameter.from_dict(unknown_parameter_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UnknownParameterParameters.md b/docs/UnknownParameterParameters.md deleted file mode 100644 index 7391e91d6..000000000 --- a/docs/UnknownParameterParameters.md +++ /dev/null @@ -1,28 +0,0 @@ -# UnknownParameterParameters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expected_parameters** | **List\[str\]** | | \[optional\] -**unknown_parameters** | **List\[str\]** | | \[optional\] - -## Example - -```python -from foundry.models import UnknownParameterParameters - -# TODO update the JSON string below -json = "{}" -# create an instance of UnknownParameterParameters from a JSON string -unknown_parameter_parameters_instance = UnknownParameterParameters.from_json(json) -# print the JSON string representation of the object -print(UnknownParameterParameters.to_json()) - -# convert the object into a dict -unknown_parameter_parameters_dict = unknown_parameter_parameters_instance.to_dict() -# create an instance of UnknownParameterParameters from a dict -unknown_parameter_parameters_form_dict = unknown_parameter_parameters.from_dict(unknown_parameter_parameters_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UnsupportedObjectSet.md b/docs/UnsupportedObjectSet.md deleted file mode 100644 index 10592ccff..000000000 --- a/docs/UnsupportedObjectSet.md +++ /dev/null @@ -1,32 +0,0 @@ -# UnsupportedObjectSet - -The requested object set is not supported. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | **object** | | - -## Example - -```python -from foundry.models import UnsupportedObjectSet - -# TODO update the JSON string below -json = "{}" -# create an instance of UnsupportedObjectSet from a JSON string -unsupported_object_set_instance = UnsupportedObjectSet.from_json(json) -# print the JSON string representation of the object -print(UnsupportedObjectSet.to_json()) - -# convert the object into a dict -unsupported_object_set_dict = unsupported_object_set_instance.to_dict() -# create an instance of UnsupportedObjectSet from a dict -unsupported_object_set_form_dict = unsupported_object_set.from_dict(unsupported_object_set_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/UploadFilePermissionDenied.md b/docs/UploadFilePermissionDenied.md deleted file mode 100644 index 3237a0cb5..000000000 --- a/docs/UploadFilePermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# UploadFilePermissionDenied - -The provided token does not have permission to upload the given file to the given dataset and transaction. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**FileAlreadyExistsParameters**](FileAlreadyExistsParameters.md) | | - -## Example - -```python -from foundry.models import UploadFilePermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadFilePermissionDenied from a JSON string -upload_file_permission_denied_instance = UploadFilePermissionDenied.from_json(json) -# print the JSON string representation of the object -print(UploadFilePermissionDenied.to_json()) - -# convert the object into a dict -upload_file_permission_denied_dict = upload_file_permission_denied_instance.to_dict() -# create an instance of UploadFilePermissionDenied from a dict -upload_file_permission_denied_form_dict = upload_file_permission_denied.from_dict(upload_file_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/docs/ViewObjectPermissionDenied.md b/docs/ViewObjectPermissionDenied.md deleted file mode 100644 index a702c847c..000000000 --- a/docs/ViewObjectPermissionDenied.md +++ /dev/null @@ -1,32 +0,0 @@ -# ViewObjectPermissionDenied - -The user does not have permission to view objects of this `ObjectType`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error_code** | **str** | | -**error_instance_id** | **str** | | \[optional\] -**error_name** | **str** | | -**parameters** | [**ObjectTypeNotSyncedParameters**](ObjectTypeNotSyncedParameters.md) | | - -## Example - -```python -from foundry.models import ViewObjectPermissionDenied - -# TODO update the JSON string below -json = "{}" -# create an instance of ViewObjectPermissionDenied from a JSON string -view_object_permission_denied_instance = ViewObjectPermissionDenied.from_json(json) -# print the JSON string representation of the object -print(ViewObjectPermissionDenied.to_json()) - -# convert the object into a dict -view_object_permission_denied_dict = view_object_permission_denied_instance.to_dict() -# create an instance of ViewObjectPermissionDenied from a dict -view_object_permission_denied_form_dict = view_object_permission_denied.from_dict(view_object_permission_denied_dict) -``` - -[\[Back to Model list\]](../README.md#documentation-for-models) [\[Back to API list\]](../README.md#documentation-for-api-endpoints) [\[Back to README\]](../README.md) diff --git a/foundry/__init__.py b/foundry/__init__.py index cd2eba43d..b7eaee312 100644 --- a/foundry/__init__.py +++ b/foundry/__init__.py @@ -25,28 +25,37 @@ # The SDK version -from foundry.versions import __version__ +from foundry._versions import __version__ # The OpenAPI document version from the spec information # See https://swagger.io/specification/#info-object -from foundry.versions import __openapi_document_version__ +from foundry._versions import __openapi_document_version__ # The OpenAPI specification version # See https://swagger.io/specification/#versions -from foundry.versions import __openapi_specification_version__ +from foundry._versions import __openapi_specification_version__ # The version of the generator used to generate the SDK -from foundry.versions import __openapi_generator_version__ - - -# import ApiClient -from foundry.api_response import ApiResponse -from foundry.auth.foundry_oauth_client import ConfidentialClientAuth -from foundry.auth.foundry_auth_token_client import UserTokenAuth -from foundry.configuration import Configuration -from foundry.exceptions import OpenApiException -from foundry.exceptions import ApiValueError -from foundry.exceptions import ApiKeyError -from foundry.exceptions import ApiAttributeError -from foundry.exceptions import ApiException +from foundry._versions import __openapi_generator_version__ + + +from foundry._core.confidential_client_auth import ConfidentialClientAuth +from foundry._core.foundry_token_auth_client import UserTokenAuth +from foundry._errors.not_authenticated import NotAuthenticated +from foundry._errors.environment_not_configured import EnvironmentNotConfigured +from foundry._errors.palantir_rpc_exception import PalantirRPCException from foundry.foundry_client import FoundryClient + + +__all__ = [ + "__version__", + "__openapi_document_version__", + "__openapi_specification_version__", + "__openapi_generator_version__", + "ConfidentialClientAuth", + "UserTokenAuth", + "NotAuthenticated", + "EnvironmentNotConfigured", + "PalantirRPCException", + "FoundryClient", +] diff --git a/foundry/_core/__init__.py b/foundry/_core/__init__.py new file mode 100644 index 000000000..2b4e3a13f --- /dev/null +++ b/foundry/_core/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/foundry/auth/_auth_utils.py b/foundry/_core/auth_utils.py similarity index 88% rename from foundry/auth/_auth_utils.py rename to foundry/_core/auth_utils.py index 5b95db47a..19e3796e0 100644 --- a/foundry/auth/_auth_utils.py +++ b/foundry/_core/auth_utils.py @@ -15,19 +15,16 @@ from abc import ABC, abstractmethod from typing import Callable, TypeVar -T = TypeVar("T") - +T = TypeVar('T') class Token(ABC): + @property @abstractmethod def access_token(self) -> str: pass - class Auth(ABC): - def __init__(self, hostname: str) -> None: - self.hostname = hostname @abstractmethod def get_token(self) -> "Token": @@ -36,3 +33,7 @@ def get_token(self) -> "Token": @abstractmethod def execute_with_token(self, func: Callable[["Token"], T]) -> T: pass + + @abstractmethod + def run_with_token(self, func: Callable[["Token"], None]) -> None: + pass diff --git a/foundry/_core/confidential_client_auth.py b/foundry/_core/confidential_client_auth.py new file mode 100644 index 000000000..fd0e18d05 --- /dev/null +++ b/foundry/_core/confidential_client_auth.py @@ -0,0 +1,119 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import asyncio +from typing import Callable, Optional, List, TypeVar + +import requests +from foundry._core.auth_utils import Auth +from foundry._core.oauth_utils import ConfidentialClientOAuthFlowProvider +from foundry._core.oauth_utils import OAuthToken +from foundry._core.oauth import SignOutResponse +from foundry._core.oauth import SignInResponse +from foundry._errors.environment_not_configured import EnvironmentNotConfigured +from foundry._errors.not_authenticated import NotAuthenticated + + +T = TypeVar('T') + +class ConfidentialClientAuth(Auth): + """ + Client for Confidential Client OAuth-authenticated Ontology applications. + Runs a background thread to periodically refresh access token. + + :param client_id: OAuth client id to be used by the application. + :param client_secret: OAuth client secret to be used by the application. + :param scopes: The list of scopes to request. + :param hostname: Hostname for authentication and ontology endpoints. + """ + def __init__(self, client_id: str, client_secret: str, hostname: str, scopes: List[str], should_refresh: bool = False) -> None: + if len(scopes) == 0: + raise ValueError("You have not provided any scopes. At least one scope must be provided.") + + self._client_id = client_id + self._client_secret = client_secret + self._token: Optional[OAuthToken] = None + self._should_refresh = should_refresh + self._refresh_task: Optional[asyncio.Task] = None + self._hostname = hostname + self._server_oauth_flow_provider = ConfidentialClientOAuthFlowProvider(client_id, client_secret, self.url, scopes=scopes) + + def get_token(self) -> OAuthToken: + if self._token is None: + raise NotAuthenticated("Client has not been authenticated.") + return self._token + + def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: + try: + return self._run_with_attempted_refresh(func) + except Exception as e: + self.sign_out() + raise e + + + def run_with_token(self, func: Callable[[OAuthToken], T]) -> None: + try: + self._run_with_attempted_refresh(func) + except Exception as e: + self.sign_out() + raise e + + def _run_with_attempted_refresh(self, func: Callable[[OAuthToken], T]) -> T: + """ + Attempt to run func, and if it fails with a 401, refresh the token and try again. + If it fails with a 401 again, raise the exception. + """ + try: + return func(self.get_token()) + except requests.HTTPError as e: + if e.response is not None and e.response.status_code == 401: + self._refresh_token() + return func(self.get_token()) + else: + raise e + + @property + def url(self): + return self._hostname.removeprefix("https://").removeprefix("http://") + + def _refresh_token(self): + self._token = self._server_oauth_flow_provider.get_token() + + def sign_in_as_service_user(self) -> SignInResponse: + token = self._server_oauth_flow_provider.get_token() + self._token = token + + async def refresh_token_task(): + while True: + if self._token is None: + raise RuntimeError("The token was None when trying to refresh.") + + await asyncio.sleep(self._token.expires_in / 60 - 10) + self._token = self._server_oauth_flow_provider.get_token() + + if self._should_refresh: + loop = asyncio.get_event_loop() + self._refresh_task = loop.create_task(refresh_token_task()) + return SignInResponse(session={"accessToken": token.access_token, "expiresIn": token.expires_in}) + + def sign_out(self) -> SignOutResponse: + if self._refresh_task: + self._refresh_task.cancel() + self._refresh_task = None + + if self._token: + self._server_oauth_flow_provider.revoke_token(self._token.access_token) + + self._token = None + return SignOutResponse() diff --git a/foundry/_core/foundry_token_auth_client.py b/foundry/_core/foundry_token_auth_client.py new file mode 100644 index 000000000..4ae9f362c --- /dev/null +++ b/foundry/_core/foundry_token_auth_client.py @@ -0,0 +1,51 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# (c) Copyright 2023 Palantir Technologies Inc. All rights reserved. + +import os +from typing import Tuple, TypeVar, Callable + +from foundry._core.auth_utils import Auth, Token +from foundry._errors.environment_not_configured import EnvironmentNotConfigured +from foundry._errors.not_authenticated import NotAuthenticated + + +T = TypeVar("T") + +class _UserToken(Token): + + def __init__(self, token: str) -> None: + self._token = token + + @property + def access_token(self) -> str: + return self._token + + +class UserTokenAuth(Auth): + def __init__(self, hostname: str, token: str) -> None: + self._hostname = hostname + self._token = _UserToken(token) + + def get_token(self) -> Token: + if self._token is None: + raise NotAuthenticated("Client has not been authenticated.") + return self._token + + def execute_with_token(self, func: Callable[[Token], T]) -> T: + return func(self.get_token()) + + def run_with_token(self, func: Callable[[Token], None]) -> None: + func(self.get_token()) diff --git a/foundry/auth/oauth.py b/foundry/_core/oauth.py similarity index 99% rename from foundry/auth/oauth.py rename to foundry/_core/oauth.py index 92eebdebd..752d8631f 100644 --- a/foundry/auth/oauth.py +++ b/foundry/_core/oauth.py @@ -14,7 +14,6 @@ from pydantic import BaseModel - class SignInResponse(BaseModel): session: dict diff --git a/foundry/_core/oauth_utils.py b/foundry/_core/oauth_utils.py new file mode 100644 index 000000000..f33aff6b7 --- /dev/null +++ b/foundry/_core/oauth_utils.py @@ -0,0 +1,279 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import hashlib +import secrets +import time +import string +import base64 + +from urllib.parse import urlencode +from typing import Optional + +import requests +from pydantic import BaseModel + +from foundry._core.auth_utils import Token + + +class OAuthUtils: + base_context_path = "/multipass" + authorize_request_path = "/api/oauth2/authorize" + token_request_path = "/api/oauth2/token" + revoke_request_path = "/api/oauth2/revoke_token" + + @staticmethod + def get_token_uri(base_uri: str, context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri( + base_uri, context_path or OAuthUtils.base_context_path, OAuthUtils.token_request_path + ) + + @staticmethod + def get_authorize_uri(base_uri: str, context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri( + base_uri, + context_path or OAuthUtils.base_context_path, + OAuthUtils.authorize_request_path, + ) + + @staticmethod + def get_revoke_uri(base_uri: str, context_path: Optional[str] = None) -> str: + return OAuthUtils.create_uri( + base_uri, context_path or OAuthUtils.base_context_path, OAuthUtils.revoke_request_path + ) + + @staticmethod + def create_uri(base_uri: str, context_path: str, request_path: str) -> str: + if base_uri.startswith("https://"): + return base_uri + context_path + request_path + else: + return "https://" + base_uri + context_path + request_path + + +class OAuthTokenResponse(BaseModel): + access_token: str + token_type: str + refresh_token: Optional[str] + expires_in: int + + def __init__(self, token_response: dict) -> None: + super().__init__(**token_response) + + +class OAuthToken(Token): + def __init__(self, token: OAuthTokenResponse): + self._token = token + + @property + def access_token(self) -> str: + return self._token.access_token + + @property + def refresh_token(self) -> Optional[str]: + return self._token.refresh_token + + @property + def expires_in(self) -> int: + return self._token.expires_in + + @property + def token_type(self) -> str: + return self._token.token_type + + def _calculate_expiration(self) -> int: + return int(self._token.expires_in * 1000 + self.current_time()) + + @property + def expires_at(self) -> int: + return self._calculate_expiration() + + @staticmethod + def current_time() -> int: + return int(time.time() * 1000) + + +class AuthorizeRequest(BaseModel): + url: str + state: str + code_verifier: str + + +class ConfidentialClientOAuthFlowProvider: + def __init__( + self, + client_id: str, + client_secret: str, + url: str, + multipass_context_path: Optional[str] = None, + scopes: Optional[list[str]] = None, + ): + self._client_id = client_id + self._client_secret = client_secret + self.url = url + self.multipass_context_path = multipass_context_path + self.scopes = scopes + + @property + def client_id(self) -> str: + return self._client_id + + @property + def client_secret(self) -> str: + return self._client_secret + + def get_token(self) -> OAuthToken: + params = { + "client_id": self._client_id, + "client_secret": self._client_secret, + "grant_type": "client_credentials", + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + token_url = OAuthUtils.get_token_uri(self.url, self.multipass_context_path) + response = requests.post(token_url, data=params) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def revoke_token(self, access_token: str) -> None: + body = { + "client_id": self._client_id, + "client_secret": self._client_secret, + "token": access_token, + } + + token_url = OAuthUtils.get_revoke_uri(self.url, self.multipass_context_path) + revoke_token_response = requests.post(token_url, data=body) + revoke_token_response.raise_for_status() + + def get_scopes(self) -> list[str]: + scopes = [] + if self.scopes: + scopes.extend(self.scopes) + scopes.append("offline_access") + return scopes + + +def generate_random_string(min_length=43, max_length=128): + characters = string.ascii_letters + string.digits + "-._~" + length = secrets.randbelow(max_length - min_length + 1) + min_length + return "".join(secrets.choice(characters) for _ in range(length)) + + +def generate_code_challenge(input_string): + # Calculate the SHA256 hash + sha256_hash = hashlib.sha256(input_string.encode("utf-8")).digest() + + # Base64-URL encode the hash and remove padding + base64url_encoded = base64.urlsafe_b64encode(sha256_hash).rstrip(b"=") + + return base64url_encoded.decode("utf-8") + + +class PublicClientOAuthFlowProvider: + def __init__( + self, + client_id: str, + redirect_url: str, + url: str, + multipass_context_path: Optional[str] = None, + scopes: Optional[list[str]] = None, + ): + self._client_id = client_id + self._redirect_url = redirect_url + self.url = url + self.multipass_context_path = multipass_context_path + self.scopes = scopes + + @property + def client_id(self) -> str: + return self._client_id + + @property + def redirect_url(self) -> str: + return self._redirect_url + + def generate_auth_request(self) -> AuthorizeRequest: + state = generate_random_string() + code_verifier = generate_random_string() + code_challenge = generate_code_challenge(code_verifier) + + params = { + "response_type": "code", + "client_id": self._client_id, + "redirect_uri": self._redirect_url, + "code_challenge": code_challenge, + "code_challenge_method": "S256", + "state": state, + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + authorize_url = OAuthUtils.get_authorize_uri(self.url, self.multipass_context_path) + + return AuthorizeRequest( + url=f"{authorize_url}?{urlencode(params, doseq=True)}", + state=state, + code_verifier=code_verifier, + ) + + def get_token(self, code: str, code_verifier: str) -> OAuthToken: + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "authorization_code", + "code": code, + "redirect_uri": self._redirect_url, + "client_id": self._client_id, + "code_verifier": code_verifier, + } + scopes = self.get_scopes() + if len(scopes) > 0: + params["scope"] = " ".join(scopes) + + token_url = OAuthUtils.get_token_uri(self.url, self.multipass_context_path) + response = requests.post(token_url, data=params, headers=headers) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def refresh_token(self, refresh_token): + headers = {"Content-Type": "application/x-www-form-urlencoded"} + params = { + "grant_type": "refresh_token", + "client_id": self._client_id, + "refresh_token": refresh_token, + } + + token_url = OAuthUtils.get_token_uri(self.url, self.multipass_context_path) + response = requests.post(token_url, data=params, headers=headers) + response.raise_for_status() + return OAuthToken(token=OAuthTokenResponse(token_response=response.json())) + + def revoke_token(self, access_token: str) -> None: + body = { + "client_id": self._client_id, + "token": access_token, + } + + token_url = OAuthUtils.get_revoke_uri(self.url, self.multipass_context_path) + revoke_token_response = requests.post(token_url, data=body) + revoke_token_response.raise_for_status() + + def get_scopes(self) -> list[str]: + scopes = [] + if self.scopes: + scopes.extend(self.scopes) + scopes.append("offline_access") + return scopes diff --git a/foundry/_core/palantir_session.py b/foundry/_core/palantir_session.py new file mode 100644 index 000000000..4695fbd8e --- /dev/null +++ b/foundry/_core/palantir_session.py @@ -0,0 +1,141 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import requests +from typing import Any, Callable, Mapping, Optional, Dict + +import foundry +from foundry._core.auth_utils import Auth, Token + + +def _run_with_401_status_check(callable: Callable[[Token], requests.Response]) -> Callable[[Token], requests.Response]: + def f(token: Token) -> requests.Response: + response = callable(token) + if response.status_code == 401: + response.raise_for_status() + return response + + func: Callable[[Token], requests.Response] = lambda token: f(token) + return func + + +class PalantirSession: + """Submits http requests with a dependency-injected authentication token provider. + + :param auth: Dependency that provides credentials for authentication. + :param preview: Boolean that enables access to endpoints in Preview Mode by default. Defaults to False. + """ + def __init__(self, auth: Auth, hostname: str, preview: bool = False) -> None: + self._auth = auth + self._hostname = hostname.removeprefix("https://").removeprefix("http://") + self.preview = preview + self._session = requests.Session() + + @property + def hostname(self) -> str: + return self._remove_host_prefix(self._hostname) + + def request( + self, + method: str, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check( + lambda token: self._session.request( + method=method, + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) + return self._auth.execute_with_token(request_fn) + + def get( + self, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check(lambda token: self._session.get(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + return self._auth.execute_with_token(request_fn) + + def post( + self, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check(lambda token: self._session.post(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + return self._auth.execute_with_token(request_fn) + + def put( + self, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check(lambda token: self._session.put(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + return self._auth.execute_with_token(request_fn) + + def delete( + self, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check(lambda token: self._session.delete(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + return self._auth.execute_with_token(request_fn) + + def patch( + self, + url: str, + headers: Optional[Mapping[str, Any]] = None, + params: Optional[Mapping[str, Any]] = None, + data: Optional[bytes] = None, + json: Optional[Any] = None, + stream: bool = True, + ) -> requests.Response: + request_fn = _run_with_401_status_check(lambda token: self._session.patch(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + return self._auth.execute_with_token(request_fn) + + + def _add_user_agent_and_auth_headers(self, token: Token, headers: Optional[Mapping[str, Any]] = None) -> Dict[str, str]: + return { + **(headers or {}), + "Authorization": "Bearer " + token.access_token, + # "User-Agent": "palantir-python-sdk-codegen/{} foundry-api/{}".format(foundry.__codegen_version__, foundry.__version__) + } + + def _remove_host_prefix(self, url: str) -> str: + return url.removeprefix("https://").removeprefix("http://") diff --git a/foundry/_core/public_client_auth.py b/foundry/_core/public_client_auth.py new file mode 100644 index 000000000..8bcc95b45 --- /dev/null +++ b/foundry/_core/public_client_auth.py @@ -0,0 +1,147 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import requests +import threading +import time +from typing import Callable, Optional, TypeVar + +from foundry._core.auth_utils import Auth +from foundry._core.oauth_utils import AuthorizeRequest +from foundry._core.oauth_utils import OAuthToken +from foundry._core.oauth_utils import PublicClientOAuthFlowProvider +from foundry._core.oauth import SignOutResponse +from foundry._errors.not_authenticated import NotAuthenticated +import webbrowser + + +T = TypeVar('T') + +class PublicClientAuth(Auth): + scopes: list[str] = ["api:read-data", "api:write-data", "offline_access"] + + """ + Client for Public Client OAuth-authenticated Ontology applications. + Runs a background thread to periodically refresh access token. + + :param client_id: OAuth client id to be used by the application. + :param client_secret: OAuth client secret to be used by the application. + :param hostname: Hostname for authentication and ontology endpoints. + """ + def __init__(self, client_id: str, redirect_url: str, hostname: str, should_refresh: bool = False) -> None: + self._client_id = client_id + self._redirect_url = redirect_url + + self._token: Optional[OAuthToken] = None + self._should_refresh = should_refresh + self._stop_refresh_event = threading.Event() + self._hostname = hostname + self._server_oauth_flow_provider = PublicClientOAuthFlowProvider(client_id=client_id, + redirect_url=redirect_url, + url=self.url, + scopes=self.scopes) + self._auth_request: Optional[AuthorizeRequest] = None + + def get_token(self) -> OAuthToken: + if self._token is None: + raise NotAuthenticated("Client has not been authenticated.") + return self._token + + def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: + try: + return self._run_with_attempted_refresh(func) + except Exception as e: + self.sign_out() + raise e + + def run_with_token(self, func: Callable[[OAuthToken], T]) -> None: + try: + self._run_with_attempted_refresh(func) + except Exception as e: + self.sign_out() + raise e + + def _refresh_token(self): + if self._token is None: + # TODO + raise Exception("") + + self._token = self._server_oauth_flow_provider.refresh_token( + refresh_token=self._token.refresh_token + ) + + def _run_with_attempted_refresh(self, func: Callable[[OAuthToken], T]) -> T: + """ + Attempt to run func, and if it fails with a 401, refresh the token and try again. + + If it fails with a 401 again, raise the exception. + """ + try: + return func(self.get_token()) + except requests.HTTPError as e: + if e.response is not None and e.response.status_code == 401: + self._refresh_token() + return func(self.get_token()) + else: + raise e + + @property + def url(self): + return self._hostname.removeprefix("https://").removeprefix("http://") + + def sign_in(self) -> None: + self._auth_request = self._server_oauth_flow_provider.generate_auth_request() + webbrowser.open(self._auth_request.url) + + def _start_auto_refresh(self): + def _auto_refresh_token(): + while not self._stop_refresh_event.is_set(): + if self._token: + # Sleep for (expires_in - 60) seconds to refresh the token 1 minute before it expires + time.sleep(self._token.expires_in - 60) + self._token = self._server_oauth_flow_provider.refresh_token( + refresh_token=self._token.refresh_token + ) + else: + # Wait 10 seconds and check again if the token is set + time.sleep(10) + + refresh_thread = threading.Thread(target=_auto_refresh_token, daemon=True) + refresh_thread.start() + + def set_token(self, code: str, state: str) -> None: + if self._auth_request is None: + raise Exception("") + # TODO + + if state != self._auth_request.state: + raise RuntimeError("Unable to verify state") + self._token = self._server_oauth_flow_provider.get_token( + code=code, code_verifier=self._auth_request.code_verifier + ) + + if self._should_refresh: + self._start_auto_refresh() + return + + def sign_out(self) -> SignOutResponse: + if self._token: + self._server_oauth_flow_provider.revoke_token(self._token.access_token) + + self._token = None + + # Signal the auto-refresh thread to stop + self._stop_refresh_event.set() + + return SignOutResponse() diff --git a/foundry/_errors/environment_not_configured.py b/foundry/_errors/environment_not_configured.py new file mode 100644 index 000000000..c50f00433 --- /dev/null +++ b/foundry/_errors/environment_not_configured.py @@ -0,0 +1,16 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class EnvironmentNotConfigured(Exception): + pass diff --git a/foundry/_errors/helpers.py b/foundry/_errors/helpers.py new file mode 100644 index 000000000..5a915c709 --- /dev/null +++ b/foundry/_errors/helpers.py @@ -0,0 +1,23 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import requests +from importlib import import_module +from json import JSONDecodeError +from typing import Dict, Any + + +def format_error_message(fields: Dict[str, Any]) -> str: + return json.dumps(fields, sort_keys=True, indent=4) diff --git a/foundry/_errors/not_authenticated.py b/foundry/_errors/not_authenticated.py new file mode 100644 index 000000000..49f5fdaa4 --- /dev/null +++ b/foundry/_errors/not_authenticated.py @@ -0,0 +1,16 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +class NotAuthenticated(Exception): + pass diff --git a/foundry/_errors/palantir_rpc_exception.py b/foundry/_errors/palantir_rpc_exception.py new file mode 100644 index 000000000..c8fb7df40 --- /dev/null +++ b/foundry/_errors/palantir_rpc_exception.py @@ -0,0 +1,23 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Any, Dict +from foundry._errors.helpers import format_error_message + +class PalantirRPCException(Exception): + def __init__(self, error_metadata: Dict[str, Any]): + super().__init__(format_error_message(error_metadata)) + self.name: str = error_metadata["errorName"] + self.parameters: Dict[str, Any] = error_metadata["parameters"] + self.error_instance_id: str = error_metadata["errorInstanceId"] diff --git a/foundry/_errors/sdk_internal_error.py b/foundry/_errors/sdk_internal_error.py new file mode 100644 index 000000000..2f5f84bf4 --- /dev/null +++ b/foundry/_errors/sdk_internal_error.py @@ -0,0 +1,73 @@ +# Copyright 2024 Palantir Technologies, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import functools +import sys +from typing import Any +from typing import Callable +from typing import TypeVar + +from pydantic import __version__ as __pydantic__version__ +from pydantic import ValidationError +from pydantic_core import __version__ as __pydantic_core_version__ +from requests import __version__ as __requests_version__ + +from foundry._errors.palantir_rpc_exception import PalantirRPCException +from foundry._versions import __version__ +from foundry._versions import __openapi_document_version__ +from foundry._versions import __openapi_specification_version__ +from foundry._versions import __openapi_generator_version__ + + +AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) + + +def handle_unexpected(__func: AnyCallableT) -> AnyCallableT: + @functools.wraps(__func) + def validate(*args, **kwargs): + try: + return __func(*args, **kwargs) + except (PalantirRPCException, ValidationError) as e: + # pass through these exceptions + raise e + except Exception as e: + raise SDKInternalError(str(e)) from e + + return validate # type: ignore + + +class SDKInternalError(Exception): + def __init__(self, msg: str) -> None: + self.msg = msg + + def __str__(self): + message = self.msg + + sys_version = sys.version.replace("\n", " ") + message += ( + "\n\nThis is an unexpected issue and should be reported. " + "When filing an issue, make sure to copy the package information " + "listed below.\n\n" + f"OS: {sys.platform}\n" + f"Python Version: {sys_version}\n" + f"SDK Version: {__version__}\n" + f"OpenAPI Document Version: {__openapi_document_version__}\n" + f"OpenAPI Specification Version: {__openapi_specification_version__}\n" + f"OpenAPI Generator Version: {__openapi_generator_version__}\n" + f"Pydantic Version: {__pydantic__version__}\n" + f"Pydantic Core Version: {__pydantic_core_version__}\n" + f"Requests Version: {__requests_version__}\n" + ) + + return message diff --git a/foundry/versions.py b/foundry/_versions.py similarity index 85% rename from foundry/versions.py rename to foundry/_versions.py index 3f68d7342..52bd9538f 100644 --- a/foundry/versions.py +++ b/foundry/_versions.py @@ -12,7 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. + +# The version is set during the publishing step (since we can't know the version in advance) +# using the autorelease bot __version__ = "0.0.0" + __openapi_document_version__ = "1.738.0" + __openapi_specification_version__ = "3.0.1" + __openapi_generator_version__ = "7.1.0" diff --git a/foundry/api/__init__.py b/foundry/api/__init__.py index 4d4d04ad3..b78e6e4b0 100644 --- a/foundry/api/__init__.py +++ b/foundry/api/__init__.py @@ -18,3 +18,4 @@ from foundry.api.datasets_api_service_api import DatasetsApiServiceApi from foundry.api.ontologies_api_service_api import OntologiesApiServiceApi from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi + diff --git a/foundry/api/datasets_api_service_api.py b/foundry/api/datasets_api_service_api.py index 6277695da..c96a876ab 100644 --- a/foundry/api/datasets_api_service_api.py +++ b/foundry/api/datasets_api_service_api.py @@ -54,7 +54,7 @@ from foundry.models.transaction_type import TransactionType from foundry.api_client import ApiClient -from foundry.exceptions import handle_unexpected +from foundry._errors.sdk_internal_error import handle_unexpected class DatasetsApiServiceApi: @@ -71,24 +71,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def abort_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """abort_transaction - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -100,9 +96,11 @@ def abort_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -113,62 +111,63 @@ def abort_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def commit_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """commit_transaction - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -180,9 +179,11 @@ def commit_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -193,60 +194,63 @@ def commit_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def create_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to create the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Branch.")], create_branch_request: CreateBranchRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Branch: """create_branch - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. (required) :type dataset_rid: str @@ -258,9 +262,11 @@ def create_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -271,7 +277,7 @@ def create_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters # process the header parameters # process the form parameters @@ -279,36 +285,46 @@ def create_branch( if create_branch_request is not None: _body_params = create_branch_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/branches", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Branch" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets/{datasetRid}/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected @@ -318,12 +334,15 @@ def create_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Dataset: """create_dataset - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param create_dataset_request: (required) :type create_dataset_request: CreateDatasetRequest @@ -333,9 +352,11 @@ def create_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -352,69 +373,72 @@ def create_dataset( if create_dataset_request is not None: _body_params = create_dataset_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dataset" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def create_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to create the Transaction." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Transaction.")], create_transaction_request: CreateTransactionRequest, - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. " - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """create_transaction - Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. (required) :type dataset_rid: str :param create_transaction_request: (required) :type create_transaction_request: CreateTransactionRequest - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. :type branch_id: str :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -422,9 +446,11 @@ def create_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -435,68 +461,77 @@ def create_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + # process the header parameters # process the form parameters # process the body parameter if create_transaction_request is not None: _body_params = create_transaction_request + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/transactions", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets/{datasetRid}/transactions', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def delete_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_branch - Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -508,9 +543,11 @@ def delete_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -521,69 +558,58 @@ def delete_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if branch_id is not None: - _path_params["branchId"] = branch_id + _path_params['branchId'] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} - response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + _response_types_map: Dict[str, Optional[str]] = { + + } + return self._api_client.call_api( + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def delete_file( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to delete the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to delete the File.")], file_path: Annotated[StrictStr, Field(description="The File path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments." - ), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field( - description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File." - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_file - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. (required) :type dataset_rid: str @@ -599,9 +625,11 @@ def delete_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -612,74 +640,72 @@ def delete_file( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} - response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + _response_types_map: Dict[str, Optional[str]] = { + + } + return self._api_client.call_api( + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def delete_schema( self, - dataset_rid: Annotated[ - StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ") - ], - branch_id: Annotated[ - Optional[StrictStr], - Field(description="The ID of the Branch on which to delete the schema. "), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The RID of the Transaction on which to delete the schema. "), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ")], + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to delete the schema. ")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The RID of the Transaction on which to delete the schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """delete_schema - Deletes the Schema from a Dataset and Branch. + Deletes the Schema from a Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to delete the schema. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch on which to delete the schema. + :param branch_id: The ID of the Branch on which to delete the schema. :type branch_id: str - :param transaction_rid: The RID of the Transaction on which to delete the schema. + :param transaction_rid: The RID of the Transaction on which to delete the schema. :type transaction_rid: str :param preview: :type preview: bool @@ -689,9 +715,11 @@ def delete_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -702,64 +730,66 @@ def delete_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + + + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} - response_data = self._api_client.call_api( - method="DELETE", - resource_path="/v1/datasets/{datasetRid}/schema", + _response_types_map: Dict[str, Optional[str]] = { + + } + return self._api_client.call_api( + method='DELETE', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_branch( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Branch." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Branch: """get_branch - Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -771,9 +801,11 @@ def get_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -784,39 +816,44 @@ def get_branch( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if branch_id is not None: - _path_params["branchId"] = branch_id + _path_params['branchId'] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Branch" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected @@ -826,12 +863,15 @@ def get_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Dataset: """get_dataset - Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: (required) :type dataset_rid: str @@ -841,9 +881,11 @@ def get_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -854,72 +896,64 @@ def get_dataset( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dataset" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_file_content( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> bytearray: """get_file_content - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -937,9 +971,11 @@ def get_file_content( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -950,83 +986,78 @@ def get_file_content( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}/content', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_file_metadata( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> File: """get_file_metadata - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -1044,9 +1075,11 @@ def get_file_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1057,76 +1090,83 @@ def get_file_metadata( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if file_path is not None: - _path_params["filePath"] = file_path + _path_params['filePath'] = file_path # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "File"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files/{filePath}", + _response_types_map: Dict[str, Optional[str]] = { + '200': "File" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/files/{filePath}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_schema( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - branch_id: Annotated[ - Optional[StrictStr], Field(description="The ID of the Branch. ") - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ") - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch. ")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> object: """get_schema - Retrieves the Schema for a Dataset and Branch, if it exists. + Retrieves the Schema for a Dataset and Branch, if it exists. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch. + :param branch_id: The ID of the Branch. :type branch_id: str - :param transaction_rid: The TransactionRid that contains the Schema. + :param transaction_rid: The TransactionRid that contains the Schema. :type transaction_rid: str :param preview: :type preview: bool @@ -1136,9 +1176,11 @@ def get_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1149,69 +1191,74 @@ def get_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "object", "204": None} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/schema", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '204': None + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_transaction( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset that contains the Transaction." - ), - ], - transaction_rid: Annotated[ - StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], + transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Transaction: """get_transaction - Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -1223,9 +1270,11 @@ def get_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1236,70 +1285,68 @@ def get_transaction( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid if transaction_rid is not None: - _path_params["transactionRid"] = transaction_rid + _path_params['transactionRid'] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", + _response_types_map: Dict[str, Optional[str]] = { + '200': "Transaction" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_branches( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to list Branches." - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Branches.")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListBranchesResponse: """list_branches - Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. (required) :type dataset_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1309,9 +1356,11 @@ def list_branches( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1322,84 +1371,73 @@ def list_branches( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListBranchesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/branches", + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListBranchesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/branches', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_files( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to list Files." - ), - ], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments." - ), - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Files.")], + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListFilesResponse: """list_files - Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. (required) :type dataset_rid: str @@ -1409,7 +1447,7 @@ def list_files( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1419,9 +1457,11 @@ def list_files( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1432,81 +1472,89 @@ def list_files( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListFilesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/files", + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListFilesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/files', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def put_schema( self, - dataset_rid: Annotated[ - StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ") - ], + dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ")], body: Dict[str, Any], - branch_id: Annotated[ - Optional[StrictStr], - Field(description="The ID of the Branch on which to put the Schema. "), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to put the Schema. ")] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> None: """put_schema - Puts a Schema on an existing Dataset and Branch. + Puts a Schema on an existing Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to put the Schema. (required) :type dataset_rid: str :param body: (required) :type body: object - :param branch_id: The ID of the Branch on which to put the Schema. + :param branch_id: The ID of the Branch on which to put the Schema. :type branch_id: str :param preview: :type preview: bool @@ -1516,9 +1564,11 @@ def put_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1529,94 +1579,80 @@ def put_schema( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter if body is not None: _body_params = body + + # set the HTTP header `Content-Type` - _default_content_type = self._api_client.select_header_content_type(["application/json"]) + _default_content_type = ( + self._api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) if _default_content_type is not None: - _header_params["Content-Type"] = _default_content_type + _header_params['Content-Type'] = _default_content_type # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {} - response_data = self._api_client.call_api( - method="PUT", - resource_path="/v1/datasets/{datasetRid}/schema", + _response_types_map: Dict[str, Optional[str]] = { + + } + return self._api_client.call_api( + method='PUT', + resource_path='/v1/datasets/{datasetRid}/schema', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def read_table( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - format: Annotated[ - TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ") - ], - branch_id: Annotated[ - Optional[StrictStr], Field(description="The identifier (name) of the Branch.") - ] = None, - start_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the start Transaction."), - ] = None, - end_transaction_rid: Annotated[ - Optional[StrictStr], - Field(description="The Resource Identifier (RID) of the end Transaction."), - ] = None, - columns: Annotated[ - Optional[List[StrictStr]], - Field( - description="A subset of the dataset columns to include in the result. Defaults to all columns. " - ), - ] = None, - row_limit: Annotated[ - Optional[StrictInt], - Field( - description="A limit on the number of rows to return. Note that row ordering is non-deterministic. " - ), - ] = None, - preview: Annotated[ - Optional[StrictBool], - Field( - description="A boolean flag that, when set to true, enables the use of beta features in preview mode. " - ), - ] = None, + format: Annotated[TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ")], + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch.")] = None, + start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, + end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + columns: Annotated[Optional[List[StrictStr]], Field(description="A subset of the dataset columns to include in the result. Defaults to all columns. ")] = None, + row_limit: Annotated[Optional[StrictInt], Field(description="A limit on the number of rows to return. Note that row ordering is non-deterministic. ")] = None, + preview: Annotated[Optional[StrictBool], Field(description="A boolean flag that, when set to true, enables the use of beta features in preview mode. ")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> bytearray: """read_table - :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str @@ -1628,11 +1664,11 @@ def read_table( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. :type columns: List[str] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. :type row_limit: int - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. :type preview: bool :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -1640,10 +1676,11 @@ def read_table( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _collection_formats: Dict[str, str] = { - "columns": "multi", + + 'columns': 'multi', } _path_params: Dict[str, str] = {} @@ -1655,98 +1692,93 @@ def read_table( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if start_transaction_rid is not None: - _query_params.append(("startTransactionRid", start_transaction_rid)) - + + _query_params.append(('startTransactionRid', start_transaction_rid)) + if end_transaction_rid is not None: - _query_params.append(("endTransactionRid", end_transaction_rid)) - + + _query_params.append(('endTransactionRid', end_transaction_rid)) + if format is not None: - _query_params.append(("format", format.value)) - + + _query_params.append(('format', format.value)) + if columns is not None: - _query_params.append(("columns", columns)) - + + _query_params.append(('columns', columns)) + if row_limit is not None: - _query_params.append(("rowLimit", row_limit)) - + + _query_params.append(('rowLimit', row_limit)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + '*/*' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/datasets/{datasetRid}/readTable", + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytearray" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/datasets/{datasetRid}/readTable', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def upload_file( self, - dataset_rid: Annotated[ - StrictStr, - Field( - description="The Resource Identifier (RID) of the Dataset on which to upload the File." - ), - ], + dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to upload the File.")], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], body: Union[StrictBytes, StrictStr], - branch_id: Annotated[ - Optional[StrictStr], - Field( - description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments." - ), - ] = None, - transaction_type: Annotated[ - Optional[TransactionType], - Field( - description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`." - ), - ] = None, - transaction_rid: Annotated[ - Optional[StrictStr], - Field( - description="The Resource Identifier (RID) of the open Transaction on which to upload the File." - ), - ] = None, + branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.")] = None, + transaction_type: Annotated[Optional[TransactionType], Field(description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`.")] = None, + transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open Transaction on which to upload the File.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> File: """upload_file - Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. (required) :type dataset_rid: str @@ -1766,9 +1798,11 @@ def upload_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1779,20 +1813,24 @@ def upload_file( # process the path parameters if dataset_rid is not None: - _path_params["datasetRid"] = dataset_rid + _path_params['datasetRid'] = dataset_rid # process the query parameters if file_path is not None: - _query_params.append(("filePath", file_path)) - + + _query_params.append(('filePath', file_path)) + if branch_id is not None: - _query_params.append(("branchId", branch_id)) - + + _query_params.append(('branchId', branch_id)) + if transaction_type is not None: - _query_params.append(("transactionType", transaction_type.value)) - + + _query_params.append(('transactionType', transaction_type.value)) + if transaction_rid is not None: - _query_params.append(("transactionRid", transaction_rid)) - + + _query_params.append(('transactionRid', transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter @@ -1804,28 +1842,33 @@ def upload_file( else: _body_params = body + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) + # authentication setting - _auth_settings: List[str] = ["BearerAuth"] + _auth_settings: List[str] = [ + 'BearerAuth' + ] - _response_types_map: Dict[str, Optional[str]] = {"200": "File"} - response_data = self._api_client.call_api( - method="POST", - resource_path="/v1/datasets/{datasetRid}/files:upload", + _response_types_map: Dict[str, Optional[str]] = { + '200': "File" + + } + return self._api_client.call_api( + method='POST', + resource_path='/v1/datasets/{datasetRid}/files:upload', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) diff --git a/foundry/api/ontologies_api_service_api.py b/foundry/api/ontologies_api_service_api.py index 021378b54..ad1e172cf 100644 --- a/foundry/api/ontologies_api_service_api.py +++ b/foundry/api/ontologies_api_service_api.py @@ -53,7 +53,7 @@ from foundry.models.query_type import QueryType from foundry.api_client import ApiClient -from foundry.exceptions import handle_unexpected +from foundry._errors.sdk_internal_error import handle_unexpected class OntologiesApiServiceApi: @@ -70,24 +70,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the action type. " - ), - ], - action_type_api_name: Annotated[ - StrictStr, Field(description="The name of the action type in the API. ") - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action type. ")], + action_type_api_name: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ActionType: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. (required) :type ontology_rid: str @@ -99,9 +95,11 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -112,65 +110,63 @@ def get_action_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if action_type_api_name is not None: - _path_params["actionTypeApiName"] = action_type_api_name + _path_params['actionTypeApiName'] = action_type_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionType"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionType" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_object_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ObjectType: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -182,9 +178,11 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -195,59 +193,62 @@ def get_object_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectType"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ObjectType" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_ontology( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> Ontology: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -257,9 +258,11 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -270,69 +273,62 @@ def get_ontology( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "Ontology"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Ontology" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_outgoing_link_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - link_type: Annotated[ - StrictStr, - Field( - description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> LinkTypeSide: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -346,9 +342,11 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -359,68 +357,66 @@ def get_outgoing_link_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type if link_type is not None: - _path_params["linkType"] = link_type + _path_params['linkType'] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSide"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LinkTypeSide" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_query_type( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - query_api_name: Annotated[ - StrictStr, - Field( - description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> QueryType: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -434,9 +430,11 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -447,73 +445,72 @@ def get_query_type( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if query_api_name is not None: - _path_params["queryApiName"] = query_api_name + _path_params['queryApiName'] = query_api_name # process the query parameters if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "QueryType"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryType" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_action_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListActionTypesResponse: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -523,9 +520,11 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -536,74 +535,74 @@ def list_action_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/actionTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListActionTypesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/actionTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_object_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListObjectTypesResponse: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -613,9 +612,11 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -626,43 +627,50 @@ def list_object_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListObjectTypesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected @@ -671,12 +679,15 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOntologiesResponse: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -684,9 +695,11 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -701,61 +714,57 @@ def list_ontologies( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOntologiesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_outgoing_link_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], Field(description="The desired size of the page to be returned.") - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOutgoingLinkTypesResponse: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -771,9 +780,11 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -784,77 +795,77 @@ def list_outgoing_link_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOutgoingLinkTypesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_query_types( self, - ontology_rid: Annotated[ - StrictStr, - Field( - description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListQueryTypesResponse: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -866,9 +877,11 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -879,43 +892,51 @@ def list_query_types( # process the path parameters if ontology_rid is not None: - _path_params["ontologyRid"] = ontology_rid + _path_params['ontologyRid'] = ontology_rid # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + if preview is not None: - _query_params.append(("preview", preview)) - + + _query_params.append(('preview', preview)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v1/ontologies/{ontologyRid}/queryTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListQueryTypesResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v1/ontologies/{ontologyRid}/queryTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) diff --git a/foundry/api/ontologies_v2_api_service_api.py b/foundry/api/ontologies_v2_api_service_api.py index e16adadda..b3d3832d6 100644 --- a/foundry/api/ontologies_v2_api_service_api.py +++ b/foundry/api/ontologies_v2_api_service_api.py @@ -56,7 +56,7 @@ from foundry.models.query_type_v2 import QueryTypeV2 from foundry.api_client import ApiClient -from foundry.exceptions import handle_unexpected +from foundry._errors.sdk_internal_error import handle_unexpected class OntologiesV2ApiServiceApi: @@ -73,24 +73,20 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - action_type: Annotated[ - StrictStr, Field(description="The name of the action type in the API. ") - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + action_type: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ActionTypeV2: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -102,9 +98,11 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -115,65 +113,63 @@ def get_action_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if action_type is not None: - _path_params["actionType"] = action_type + _path_params['actionType'] = action_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ActionTypeV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionTypeV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/actionTypes/{actionType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_deployment( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - deployment: Annotated[ - StrictStr, - Field( - description="The API name of the deployment you want to fetch information about. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + deployment: Annotated[StrictStr, Field(description="The API name of the deployment you want to fetch information about. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> DeploymentMetadata: """get_deployment - Fetches information about a model deployment within a given Ontology. + Fetches information about a model deployment within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -185,9 +181,11 @@ def get_deployment( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -198,65 +196,63 @@ def get_deployment( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if deployment is not None: - _path_params["deployment"] = deployment + _path_params['deployment'] = deployment # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "DeploymentMetadata"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/models/deployments/{deployment}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DeploymentMetadata" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/models/deployments/{deployment}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_object_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ObjectTypeV2: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -268,9 +264,11 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -281,59 +279,62 @@ def get_object_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectTypeV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ObjectTypeV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_ontology_full_metadata( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> OntologyFullMetadata: """get_ontology_full_metadata - Get the full Ontology metadata. This includes the objects, links, actions, and queries. + Get the full Ontology metadata. This includes the objects, links, actions, and queries. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -343,9 +344,11 @@ def get_ontology_full_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -356,57 +359,60 @@ def get_ontology_full_metadata( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyFullMetadata"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/fullMetadata", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OntologyFullMetadata" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/fullMetadata', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_ontology( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> OntologyV2: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -416,9 +422,11 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -429,69 +437,62 @@ def get_ontology( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "OntologyV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_outgoing_link_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - link_type: Annotated[ - StrictStr, - Field( - description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> LinkTypeSideV2: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -505,9 +506,11 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -518,67 +521,65 @@ def get_outgoing_link_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type if link_type is not None: - _path_params["linkType"] = link_type + _path_params['linkType'] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSideV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "LinkTypeSideV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def get_query_type( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - query_api_name: Annotated[ - StrictStr, - Field( - description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> QueryTypeV2: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -590,9 +591,11 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -603,70 +606,68 @@ def get_query_type( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if query_api_name is not None: - _path_params["queryApiName"] = query_api_name + _path_params['queryApiName'] = query_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "QueryTypeV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "QueryTypeV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/queryTypes/{queryApiName}', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_action_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListActionTypesResponseV2: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -676,9 +677,11 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -689,63 +692,68 @@ def list_action_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponseV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/actionTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListActionTypesResponseV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/actionTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_deployments( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListDeploymentsResponse: """list_deployments - Fetches a list of the available model deployments within a given Ontology. + Fetches a list of the available model deployments within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -755,9 +763,11 @@ def list_deployments( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -768,68 +778,66 @@ def list_deployments( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListDeploymentsResponse"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/models/deployments", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDeploymentsResponse" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/models/deployments', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_object_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListObjectTypesV2Response: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -839,9 +847,11 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -852,43 +862,50 @@ def list_object_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesV2Response"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListObjectTypesV2Response" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected @@ -897,12 +914,15 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOntologiesV2Response: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -910,9 +930,11 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -927,61 +949,57 @@ def list_ontologies( # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesV2Response"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOntologiesV2Response" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_outgoing_link_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - object_type: Annotated[ - StrictStr, - Field( - description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], Field(description="The desired size of the page to be returned.") - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListOutgoingLinkTypesResponseV2: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -997,9 +1015,11 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1010,76 +1030,76 @@ def list_outgoing_link_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology if object_type is not None: - _path_params["objectType"] = object_type + _path_params['objectType'] = object_type # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponseV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListOutgoingLinkTypesResponseV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) @validate_call @handle_unexpected def list_query_types( self, - ontology: Annotated[ - StrictStr, - Field( - description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " - ), - ], - page_size: Annotated[ - Optional[StrictInt], - Field( - description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " - ), - ] = None, + ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] ] = None, ) -> ListQueryTypesResponseV2: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1089,9 +1109,11 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = {} + _collection_formats: Dict[str, str] = { + + } _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1102,40 +1124,47 @@ def list_query_types( # process the path parameters if ontology is not None: - _path_params["ontology"] = ontology + _path_params['ontology'] = ontology # process the query parameters if page_size is not None: - _query_params.append(("pageSize", page_size)) - + + _query_params.append(('pageSize', page_size)) + if page_token is not None: - _query_params.append(("pageToken", page_token)) - + + _query_params.append(('pageToken', page_token)) + # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` - _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) + _header_params['Accept'] = self._api_client.select_header_accept( + [ + 'application/json' + ] + ) - # authentication setting - _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponseV2"} - response_data = self._api_client.call_api( - method="GET", - resource_path="/v2/ontologies/{ontology}/queryTypes", + # authentication setting + _auth_settings: List[str] = [ + 'BearerAuth' + ] + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListQueryTypesResponseV2" + + } + return self._api_client.call_api( + method='GET', + resource_path='/v2/ontologies/{ontology}/queryTypes', path_params=_path_params, query_params=_query_params, header_params=_header_params, body=_body_params, post_params=_form_params, files=_files, - auth_settings=_auth_settings, collection_formats=_collection_formats, - _request_timeout=_request_timeout, - ) - response_data.read() - return self._api_client.response_deserialize( - response_data=response_data, response_types_map=_response_types_map, - ).data + ) diff --git a/foundry/api_client.py b/foundry/api_client.py index 0065c6846..a56cb50a2 100644 --- a/foundry/api_client.py +++ b/foundry/api_client.py @@ -24,10 +24,8 @@ """ # noqa: E501 -import atexit import datetime from dateutil.parser import parse -import inspect import json import mimetypes import os @@ -37,30 +35,17 @@ from typing import Dict from typing import List from typing import Optional -from typing import Tuple from typing import TypeVar -from typing import Union from urllib.parse import quote from pydantic import TypeAdapter -from foundry.api_response import ApiResponse -from foundry.auth._auth_utils import Token -from foundry.configuration import Configuration import foundry.models -from foundry import rest -from foundry.versions import __version__ -from foundry.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException, - SDKInternalError, - OpenApiException, -) +from foundry._core.auth_utils import Auth +from foundry._core.palantir_session import PalantirSession +from foundry._versions import __version__ +from foundry._errors.palantir_rpc_exception import PalantirRPCException +from foundry._errors.sdk_internal_error import SDKInternalError class ApiClient: @@ -71,7 +56,6 @@ class ApiClient: the methods and models for each application are generated from the OpenAPI templates. - :param configuration: .Configuration object for this client :param header_name: a header to pass when making calls to the API. :param header_value: a header value to pass when making calls to the API. @@ -90,17 +74,19 @@ class ApiClient: "datetime": datetime.datetime, "object": object, } + DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f%z" + DATE_FORMAT = "%Y-%m-%d" _pool = None def __init__( self, - configuration: Configuration, + auth: Auth, + hostname: str, header_name: Optional[str] = None, header_value: Optional[str] = None, cookie: Optional[str] = None, ): - self.configuration = configuration - self.rest_client = rest.RESTClientObject(configuration) + self.session = PalantirSession(auth=auth, hostname=hostname) self.default_headers = { "User-Agent": f"foundry-platform-sdk/{__version__}", @@ -123,16 +109,15 @@ def call_api( self, method, resource_path, + response_types_map: Dict[str, Optional[str]], path_params=None, query_params=None, header_params=None, body=None, post_params=None, files=None, - auth_settings=None, collection_formats=None, - _request_timeout=None, - ) -> rest.RESTResponse: + ) -> Any: """Makes the HTTP request (synchronous) :param method: Method to call. :param resource_path: Path to method endpoint. @@ -143,14 +128,12 @@ def call_api( :param body: Request body. :param post_params dict: Request post form parameters, for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. :param files dict: key -> filename, value -> filepath, for `multipart/form-data`. :param collection_formats: dict of collection formats for path, query, header, and post parameters. :return: tuple of form (path, http_method, query_params, header_params, body, post_params, files) - :param _request_timeout: timeout setting for this request. :return: RESTResponse """ # header parameters @@ -178,99 +161,45 @@ def call_api( if body: body = self.sanitize_for_serialization(body) - url = self.configuration.host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query(query_params, collection_formats) - url += "?" + url_query - - def send_request(token: Optional[Token]): - if token is not None: - headers["Authorization"] = "Bearer " + token.access_token - - return self.rest_client.request( - method, - url, - headers=headers, - body=body, - post_params=post_params, - _request_timeout=_request_timeout, - ) - - if auth_settings and "BearerAuth" in auth_settings: - return self.configuration.auth.execute_with_token(send_request) - else: - return send_request(None) + url = f"https://{self.session.hostname}/api{resource_path}" - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Dict[str, Optional[str]], - ) -> ApiResponse: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ + res = self.session.request( + method=method, + url=url, + headers=headers, + params=query_params, + json=body, + stream=False, + ) - response_type = response_types_map.get(str(response_data.status), None) - if ( - not response_type - and isinstance(response_data.status, int) - and 100 <= response_data.status <= 599 - ): + response_type = response_types_map.get(str(res.status_code), None) + if not response_type and isinstance(res.status_code, int) and 100 <= res.status_code <= 599: # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - if not 200 <= response_data.status <= 299: - if not 400 <= response_data.status <= 599: - raise SDKInternalError(f"Received unexpected status code: {response_data.status}") - - if response_data.status == 400: - raise BadRequestException(response_data.response) - - if response_data.status == 401: - raise UnauthorizedException(response_data.response) - - if response_data.status == 403: - raise ForbiddenException(response_data.response) + response_type = response_types_map.get(str(res.status_code)[0] + "XX", None) - if response_data.status == 404: - raise NotFoundException(response_data.response) - - if 500 <= response_data.status <= 599: - raise ServiceException(response_data.response) - - raise ApiException(response_data.response) - - # deserialize response data - if response_data.data is None: - raise SDKInternalError(".read() has not been called.") + if not 200 <= res.status_code <= 299: + try: + raise PalantirRPCException(res.json()) + except json.JSONDecodeError: + raise SDKInternalError("Unable to decode JSON error response: " + res.text) if response_type == "bytearray": - return_data = response_data.data + return_data = res.content elif response_type is None: return_data = None elif response_type == "file": - return_data = self.__deserialize_file(response_data) + return_data = self.__deserialize_file(res) else: match = None - content_type = response_data.getheader("content-type") + content_type = res.headers.get("content-type") if content_type is not None: match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) + response_text = res.content.decode(encoding) return_data = self.deserialize(response_text, response_type) - return ApiResponse( - status_code=response_data.status, - data=return_data, - headers=response_data.getheaders(), # type: ignore - raw_data=response_data.data, - ) + return return_data def sanitize_for_serialization(self, obj): """Builds a JSON POST object. @@ -399,43 +328,6 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == "multi": - new_params.extend((k, value) for value in v) - else: - if collection_format == "ssv": - delimiter = " " - elif collection_format == "tsv": - delimiter = "\t" - elif collection_format == "pipes": - delimiter = "|" - else: # csv is the default - delimiter = "," - new_params.append((k, delimiter.join(quote(str(value)) for value in v))) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(item) for item in new_params]) - def files_parameters(self, files=None): """Builds form parameters. @@ -550,7 +442,7 @@ def __deserialize_date(self, string): except ImportError: return string except ValueError: - raise OpenApiException("Failed to parse `{0}` as date object".format(string)) + raise SDKInternalError("Failed to parse `{0}` as date object".format(string)) def __deserialize_datetime(self, string): """Deserializes string to datetime. @@ -565,7 +457,7 @@ def __deserialize_datetime(self, string): except ImportError: return string except ValueError: - raise OpenApiException("Failed to parse `{0}` as datetime object".format(string)) + raise SDKInternalError("Failed to parse `{0}` as datetime object".format(string)) def __deserialize_model(self, data, klass): """Deserializes list or dict to model. diff --git a/foundry/api_response.py b/foundry/api_response.py deleted file mode 100644 index 287dd06dc..000000000 --- a/foundry/api_response.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""API response object.""" - -from __future__ import annotations -from typing import Any, Dict, Optional, Generic, TypeVar -from pydantic import Field, StrictInt, StrictStr, StrictBytes, BaseModel - -T = TypeVar("T") - - -class ApiResponse(BaseModel, Generic[T]): - """ - API response object - """ - - status_code: StrictInt = Field(description="HTTP status code") - headers: Optional[Dict[StrictStr, StrictStr]] = Field(None, description="HTTP headers") - data: T = Field(description="Deserialized data given the data type") - raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") - - model_config = {"arbitrary_types_allowed": True} diff --git a/foundry/auth/_oauth_utils.py b/foundry/auth/_oauth_utils.py deleted file mode 100644 index 52e18731f..000000000 --- a/foundry/auth/_oauth_utils.py +++ /dev/null @@ -1,167 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import time -import json -from typing import Dict -from typing import Optional -from typing import List - -from pydantic import BaseModel -import urllib.parse -import urllib3 - -from foundry.auth._auth_utils import Token -from foundry.exceptions import ApiException - - -class OAuthUtils: - base_context_path = "/multipass" - authorize_request_path = "/api/oauth2/authorize" - token_request_path = "/api/oauth2/token" - revoke_request_path = "/api/oauth2/revoke_token" - - @staticmethod - def get_token_uri(base_uri: str, context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri( - base_uri, context_path or OAuthUtils.base_context_path, OAuthUtils.token_request_path - ) - - @staticmethod - def get_authorize_uri(base_uri: str, context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri( - base_uri, - context_path or OAuthUtils.base_context_path, - OAuthUtils.authorize_request_path, - ) - - @staticmethod - def get_revoke_uri(base_uri: str, context_path: Optional[str] = None) -> str: - return OAuthUtils.create_uri( - base_uri, context_path or OAuthUtils.base_context_path, OAuthUtils.revoke_request_path - ) - - @staticmethod - def create_uri(base_uri: str, context_path: str, request_path: str) -> str: - if base_uri.startswith("https://"): - return base_uri + context_path + request_path - else: - return "https://" + base_uri + context_path + request_path - - @staticmethod - def post(url: str, data: Dict[str, str]): - res = urllib3.request( - method="POST", - url=url, - body=urllib.parse.urlencode(data), - headers={"Content-Type": "application/x-www-form-urlencoded"}, - ) - - if 200 <= res.status < 300: - return json.loads(res.data.decode("utf-8")) - else: - raise ApiException(res) - - -class OAuthTokenResponse(BaseModel): - access_token: str - token_type: str - refresh_token: Optional[str] - expires_in: int - - def __init__(self, token_response: dict) -> None: - super().__init__(**token_response) - - -class OAuthToken(Token): - def __init__(self, token: OAuthTokenResponse): - self._token = token - - @property - def access_token(self) -> str: - return self._token.access_token - - @property - def expires_in(self) -> int: - return self._token.expires_in - - @property - def token_type(self) -> str: - return self._token.token_type - - def _calculate_expiration(self) -> int: - return int(self._token.expires_in * 1000 + self.current_time()) - - @property - def expires_at(self) -> int: - return self._calculate_expiration() - - @staticmethod - def current_time() -> int: - return int(time.time() * 1000) - - -class ServerOAuthFlowProvider: - def __init__( - self, - client_id: str, - client_secret: str, - url: str, - multipass_context_path: Optional[str] = None, - scopes: Optional[List[str]] = None, - ): - self._client_id = client_id - self._client_secret = client_secret - self.url = url - self.multipass_context_path = multipass_context_path - self.scopes = scopes - - @property - def client_id(self) -> str: - return self._client_id - - @property - def client_secret(self) -> str: - return self._client_secret - - def get_token(self) -> OAuthToken: - params = { - "client_id": self._client_id, - "client_secret": self._client_secret, - "grant_type": "client_credentials", - } - scopes = self.get_scopes() - if len(scopes) > 0: - params["scope"] = " ".join(scopes) - - token_url = OAuthUtils.get_token_uri(self.url, self.multipass_context_path) - response = OAuthUtils.post(token_url, data=params) - return OAuthToken(token=OAuthTokenResponse(token_response=response)) - - def revoke_token(self, access_token: str) -> None: - body = { - "client_id": self._client_id, - "client_secret": self._client_secret, - "token": access_token, - } - - token_url = OAuthUtils.get_revoke_uri(self.url, self.multipass_context_path) - OAuthUtils.post(token_url, data=body) - - def get_scopes(self) -> List[str]: - scopes = [] - if self.scopes: - scopes.extend(self.scopes) - scopes.append("offline_access") - return scopes diff --git a/foundry/auth/foundry_auth_token_client.py b/foundry/auth/foundry_auth_token_client.py deleted file mode 100644 index a2541835a..000000000 --- a/foundry/auth/foundry_auth_token_client.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# (c) Copyright 2023 Palantir Technologies Inc. All rights reserved. - -import os -from typing import Optional, TypeVar, Tuple, Callable - -from foundry.auth._auth_utils import Auth -from foundry.auth._auth_utils import Token - - -T = TypeVar("T") - - -class _UserToken(Token): - def __init__(self, token: str) -> None: - self._token = token - - @property - def access_token(self) -> str: - return self._token - - -class UserTokenAuth(Auth): - """ - :param hostname: Your Foundry instance's hostname. (optional) - :param token: Your bearer access token. (optional) - """ - - HOSTNAME_VAR = "FOUNDRY_HOSTNAME" - TOKEN_VAR = "FOUNDRY_TOKEN" - - def __init__( - self, - hostname: Optional[str] = None, - token: Optional[str] = None, - ) -> None: - if hostname is not None and token is not None: - pass - elif hostname is None and token is None: - hostname, token = self._init_from_env() - else: - raise ValueError( - """Unable to configure client: Either both - the hostname and token are must be provided as keyword - arguments or both from environmental variables.""" - ) - - self.hostname = hostname - self.token = token - self._token = _UserToken(token) - - super().__init__(hostname=hostname) - assert isinstance(token, str), f"token must be a str, not {type(token)}" - - def get_token(self) -> Token: - return self._token - - def execute_with_token(self, func: Callable[[Token], T]) -> T: - return func(self.get_token()) - - def _init_from_env(self) -> Tuple[str, str]: - hostname = os.environ.get(self.HOSTNAME_VAR) - token = os.environ.get(self.TOKEN_VAR) - - if hostname is None: - raise ValueError( - f"Unable to configure client: ${self.HOSTNAME_VAR} not found in environment." - ) - - if token is None: - raise ValueError( - f"Unable to configure client: ${self.TOKEN_VAR} not found in environment." - ) - - return hostname, token diff --git a/foundry/auth/foundry_oauth_client.py b/foundry/auth/foundry_oauth_client.py deleted file mode 100644 index ce8a98a25..000000000 --- a/foundry/auth/foundry_oauth_client.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from typing import Callable -from typing import List -from typing import Optional -from typing import TypeVar - - -from foundry.auth._auth_utils import Auth -from foundry.auth._oauth_utils import ServerOAuthFlowProvider, OAuthToken -from foundry.auth.oauth import SignInResponse, SignOutResponse -from foundry.exceptions import OpenApiException, UnauthorizedException - - -T = TypeVar("T") - - -class ConfidentialClientAuth(Auth): - """ - Client for OAuth-authenticated Ontology applications. - Runs a background thread to periodically refresh access token. - - :param client_id: OAuth client id to be used by the application. - :param client_secret: OAuth client secret to be used by the application. - :param hostname: Hostname for authentication and ontology endpoints. - """ - - def __init__( - self, - client_id: str, - client_secret: str, - hostname: str, - scopes: List[str], - ) -> None: - if len(scopes) == 0: - raise ValueError( - "You have not provided any scopes. At least one scope must be provided." - ) - - super().__init__(hostname=hostname) - self._client_id = client_id - self._client_secret = client_secret - self._token: Optional[OAuthToken] = None - self._server_oauth_flow_provider = ServerOAuthFlowProvider( - client_id, - client_secret, - hostname, - scopes=scopes, - ) - - def get_token(self) -> OAuthToken: - if self._token is None: - raise OpenApiException( - "ConfidentialClientAuth has not been authenticated. Please call sign_in_as_service_user() first." - ) - - return self._token - - def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: - try: - return self._run_with_attempted_refresh(func) - except Exception as e: - self.sign_out() - raise e - - def _run_with_attempted_refresh(self, func: Callable[[OAuthToken], T]) -> T: - """ - Attempt to run func, and if it fails with a 401, refresh the token and try again. - If it fails with a 401 again, raise the exception. - """ - try: - return func(self.get_token()) - except UnauthorizedException: - self._refresh_token() - return func(self.get_token()) - - def _refresh_token(self): - self._token = self._server_oauth_flow_provider.get_token() - - def sign_in_as_service_user(self) -> SignInResponse: - token = self._server_oauth_flow_provider.get_token() - self._token = token - - return SignInResponse( - session={"accessToken": token.access_token, "expiresIn": token.expires_in} - ) - - def sign_out(self) -> SignOutResponse: - if self._token: - self._server_oauth_flow_provider.revoke_token(self._token.access_token) - - self._token = None - return SignOutResponse() diff --git a/foundry/configuration.py b/foundry/configuration.py deleted file mode 100644 index c7273d55e..000000000 --- a/foundry/configuration.py +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import logging - -from foundry.auth._auth_utils import Auth -import http.client as httplib - - -class Configuration: - """This class contains various settings of the API client.""" - - def __init__(self, auth: Auth) -> None: - """The auth settings""" - self.auth = auth - - """Default Base url""" - self.host = f"https://{auth.hostname}/api" - - self.logger = {} - - self.verify_ssl = True - - """Logging Settings""" - self.logger["package_logger"] = logging.getLogger("foundry") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - - """Log format""" - self.logger_format = "%(asctime)s %(levelname)s %(message)s" - - """Log stream handler""" - self.logger_stream_handler = None - - """Log file handler""" - self.logger_file_handler = None - - """Log file""" - self.logger_file = None - - """Debug file location""" - self.debug = False - - """Adding retries to override urllib3 default value 3""" - self.retries = None - - """datetime format""" - self.datetime_format = "%Y-%m-%dT%H:%M:%S.%f%z" - - """date format""" - self.date_format = "%Y-%m-%d" - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) diff --git a/foundry/exceptions.py b/foundry/exceptions.py deleted file mode 100644 index 9564c4a42..000000000 --- a/foundry/exceptions.py +++ /dev/null @@ -1,225 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import functools -import json -from typing import Any -from typing import Callable -from typing import Dict -from typing import Optional -from typing import TypeVar -import sys -from urllib3._collections import HTTPHeaderDict -from foundry.versions import __version__ -from foundry.versions import __openapi_document_version__ -from foundry.versions import __openapi_specification_version__ -from foundry.versions import __openapi_generator_version__ -from pydantic import __version__ as __pydantic__version__ -from pydantic_core import __version__ as __pydantic_core__version__ -from pydantic import ValidationError - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class SDKInternalError(Exception): - def __init__(self, msg: str) -> None: - self.msg = msg - - def __str__(self): - message = self.msg - - sys_version = sys.version.replace("\n", " ") - message += ( - "\n\nThis is an unexpected issue and should be reported. " - "When filing an issue, make sure to copy the package information " - "listed below.\n\n" - f"OS: {sys.platform}\n" - f"Python Version: {sys_version}\n" - f"SDK Version: {__version__}\n" - f"OpenAPI Document Version: {__openapi_document_version__}\n" - f"OpenAPI Specification Version: {__openapi_specification_version__}\n" - f"OpenAPI Generator Version: {__openapi_generator_version__}\n" - f"Pydantic Version: {__pydantic__version__}\n" - f"Pydantic Core Version: {__pydantic_core__version__}\n" - ) - - return message - - -AnyCallableT = TypeVar("AnyCallableT", bound=Callable[..., Any]) - - -def handle_unexpected( - __func: AnyCallableT, -) -> AnyCallableT: - @functools.wraps(__func) - def validate(*args, **kwargs): - try: - return __func(*args, **kwargs) - except (OpenApiException, ValidationError) as e: - # pass through these exceptions - raise e - except Exception as e: - raise SDKInternalError(str(e)) from e - - return validate # type: ignore - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - status: int - reason: Optional[str] - body: Optional[str] - headers: HTTPHeaderDict - json: dict - error_code: str - error_name: str - error_instance_id: str - parameters: Dict[str, Any] - - def __init__( - self, - http_resp: Urllib3Response, - ) -> None: - self.status = http_resp.status - self.reason = http_resp.reason - self.body = http_resp.data.decode("utf-8") - self.headers = http_resp.headers - try: - self.json = json.loads(self.body or "") - except Exception as e: - raise SDKInternalError(f"Unable to parse error body: {self.body}") - - try: - self.error_code = self.json["errorCode"] - self.error_name = self.json["errorName"] - self.error_instance_id = self.json["errorInstanceId"] - self.parameters = self.json["parameters"] - except KeyError as e: - raise SDKInternalError(f"Unable to fetch error information: {e}") - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n" "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format(self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result - - -# Delayed import since the rest module imports exceptions from the module -from foundry.rest import RESTResponse -from foundry.rest import Urllib3Response diff --git a/foundry/foundry_client.py b/foundry/foundry_client.py index 484aea661..d28180b4d 100644 --- a/foundry/foundry_client.py +++ b/foundry/foundry_client.py @@ -12,14 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""This file was auto-generated from our API Definition.""" - +from foundry._core.auth_utils import Auth +from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi from foundry.api.datasets_api_service_api import DatasetsApiServiceApi from foundry.api.ontologies_api_service_api import OntologiesApiServiceApi -from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi from foundry.api_client import ApiClient -from foundry.auth._auth_utils import Auth -from foundry.configuration import Configuration +from foundry._errors.environment_not_configured import EnvironmentNotConfigured class FoundryClient: @@ -27,12 +25,11 @@ class FoundryClient: The Foundry API client. :param auth: Your auth configuration. - + :param hostname: Your Foundry hostname (for example, "myfoundry.palantirfoundry.com"). """ - def __init__(self, auth: Auth): - self.configuration = Configuration(auth=auth) - _api_client = ApiClient(configuration=self.configuration) - self.ontologies_v2 = OntologiesV2ApiServiceApi(api_client=_api_client) - self.datasets = DatasetsApiServiceApi(api_client=_api_client) - self.ontologies = OntologiesApiServiceApi(api_client=_api_client) + def __init__(self, auth: Auth, hostname: str): + api_client = ApiClient(auth=auth, hostname=hostname) + self.ontologies_v2 = OntologiesV2ApiServiceApi(api_client=api_client) + self.datasets = DatasetsApiServiceApi(api_client=api_client) + self.ontologies = OntologiesApiServiceApi(api_client=api_client) diff --git a/foundry/models/__init__.py b/foundry/models/__init__.py index 19f4cc5a3..9990dbb5a 100644 --- a/foundry/models/__init__.py +++ b/foundry/models/__init__.py @@ -28,196 +28,44 @@ # import models into model package -from foundry.models.abort_transaction_permission_denied import AbortTransactionPermissionDenied -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) -from foundry.models.action_contains_duplicate_edits import ActionContainsDuplicateEdits -from foundry.models.action_edited_properties_not_found import ActionEditedPropertiesNotFound -from foundry.models.action_not_found import ActionNotFound -from foundry.models.action_not_found_parameters import ActionNotFoundParameters from foundry.models.action_parameter_type import ActionParameterArrayType -from foundry.models.action_parameter_object_not_found import ActionParameterObjectNotFound -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) -from foundry.models.action_parameter_object_type_not_found import ActionParameterObjectTypeNotFound from foundry.models.action_parameter_type import ActionParameterType from foundry.models.action_parameter_v2 import ActionParameterV2 from foundry.models.action_type import ActionType -from foundry.models.action_type_not_found import ActionTypeNotFound -from foundry.models.action_type_not_found_parameters import ActionTypeNotFoundParameters from foundry.models.action_type_v2 import ActionTypeV2 -from foundry.models.action_validation_failed import ActionValidationFailed -from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters -from foundry.models.aggregation_group_count_exceeded_limit import AggregationGroupCountExceededLimit -from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( - AggregationGroupCountExceededLimitParameters, -) from foundry.models.any_type import AnyType -from foundry.models.api_feature_preview_usage_only import ApiFeaturePreviewUsageOnly -from foundry.models.api_usage_denied import ApiUsageDenied -from foundry.models.apply_action_failed import ApplyActionFailed -from foundry.models.apply_action_mode import ApplyActionMode -from foundry.models.apply_action_request_options import ApplyActionRequestOptions -from foundry.models.async_operation_error import AsyncOperationError -from foundry.models.attachment_not_found import AttachmentNotFound -from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters -from foundry.models.attachment_size_exceeded_limit import AttachmentSizeExceededLimit -from foundry.models.attachment_size_exceeded_limit_parameters import ( - AttachmentSizeExceededLimitParameters, -) from foundry.models.attachment_type import AttachmentType from foundry.models.binary_type import BinaryType from foundry.models.boolean_type import BooleanType from foundry.models.branch import Branch -from foundry.models.branch_already_exists import BranchAlreadyExists -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from foundry.models.branch_not_found import BranchNotFound from foundry.models.byte_type import ByteType -from foundry.models.column_types_not_supported import ColumnTypesNotSupported -from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters -from foundry.models.commit_transaction_permission_denied import CommitTransactionPermissionDenied -from foundry.models.composite_primary_key_not_supported import CompositePrimaryKeyNotSupported -from foundry.models.composite_primary_key_not_supported_parameters import ( - CompositePrimaryKeyNotSupportedParameters, -) -from foundry.models.create_branch_permission_denied import CreateBranchPermissionDenied from foundry.models.create_branch_request import CreateBranchRequest -from foundry.models.create_dataset_permission_denied import CreateDatasetPermissionDenied -from foundry.models.create_dataset_permission_denied_parameters import ( - CreateDatasetPermissionDeniedParameters, -) from foundry.models.create_dataset_request import CreateDatasetRequest from foundry.models.create_link_rule import CreateLinkRule from foundry.models.create_object_rule import CreateObjectRule -from foundry.models.create_transaction_permission_denied import CreateTransactionPermissionDenied from foundry.models.create_transaction_request import CreateTransactionRequest from foundry.models.dataset import Dataset -from foundry.models.dataset_not_found import DatasetNotFound from foundry.models.date_type import DateType from foundry.models.decimal_type import DecimalType -from foundry.models.delete_branch_permission_denied import DeleteBranchPermissionDenied from foundry.models.delete_link_rule import DeleteLinkRule from foundry.models.delete_object_rule import DeleteObjectRule -from foundry.models.delete_schema_permission_denied import DeleteSchemaPermissionDenied -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) from foundry.models.deployment_api import DeploymentApi from foundry.models.deployment_listing import DeploymentListing from foundry.models.deployment_metadata import DeploymentMetadata -from foundry.models.deployment_not_available import DeploymentNotAvailable -from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters -from foundry.models.deployment_not_found import DeploymentNotFound from foundry.models.deployment_transform_api import DeploymentTransformApi -from foundry.models.distance_unit import DistanceUnit from foundry.models.double_type import DoubleType -from foundry.models.duplicate_order_by import DuplicateOrderBy -from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters -from foundry.models.edit_object_permission_denied import EditObjectPermissionDenied from foundry.models.file import File -from foundry.models.file_already_exists import FileAlreadyExists -from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters -from foundry.models.file_not_found_on_branch import FileNotFoundOnBranch -from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters -from foundry.models.file_not_found_on_transaction_range import FileNotFoundOnTransactionRange -from foundry.models.file_not_found_on_transaction_range_parameters import ( - FileNotFoundOnTransactionRangeParameters, -) from foundry.models.float_type import FloatType -from foundry.models.folder_not_found import FolderNotFound -from foundry.models.folder_not_found_parameters import FolderNotFoundParameters -from foundry.models.function_encountered_user_facing_error import FunctionEncounteredUserFacingError -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) -from foundry.models.function_execution_failed import FunctionExecutionFailed -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from foundry.models.function_execution_timed_out import FunctionExecutionTimedOut -from foundry.models.function_invalid_input import FunctionInvalidInput from foundry.models.geo_point import GeoPoint from foundry.models.geo_point_type import GeoPointType from foundry.models.geo_shape_type import GeoShapeType from foundry.models.geometry import Geometry from foundry.models.geometry import GeometryCollection from foundry.models.integer_type import IntegerType -from foundry.models.invalid_aggregation_range import InvalidAggregationRange -from foundry.models.invalid_aggregation_range_property_type import ( - InvalidAggregationRangePropertyType, -) -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) -from foundry.models.invalid_aggregation_range_value import InvalidAggregationRangeValue -from foundry.models.invalid_apply_action_option_combination import ( - InvalidApplyActionOptionCombination, -) -from foundry.models.invalid_apply_action_option_combination_parameters import ( - InvalidApplyActionOptionCombinationParameters, -) -from foundry.models.invalid_branch_id import InvalidBranchId -from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters -from foundry.models.invalid_content_length import InvalidContentLength -from foundry.models.invalid_content_type import InvalidContentType -from foundry.models.invalid_duration_group_by_property_type import ( - InvalidDurationGroupByPropertyType, -) -from foundry.models.invalid_duration_group_by_value import InvalidDurationGroupByValue -from foundry.models.invalid_fields import InvalidFields -from foundry.models.invalid_fields_parameters import InvalidFieldsParameters -from foundry.models.invalid_group_id import InvalidGroupId -from foundry.models.invalid_group_id_parameters import InvalidGroupIdParameters -from foundry.models.invalid_page_size import InvalidPageSize -from foundry.models.invalid_page_size_parameters import InvalidPageSizeParameters -from foundry.models.invalid_page_token import InvalidPageToken -from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters -from foundry.models.invalid_parameter_combination import InvalidParameterCombination -from foundry.models.invalid_parameter_combination_parameters import ( - InvalidParameterCombinationParameters, -) -from foundry.models.invalid_parameter_value import InvalidParameterValue -from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters -from foundry.models.invalid_property_filter_value import InvalidPropertyFilterValue -from foundry.models.invalid_property_filter_value_parameters import ( - InvalidPropertyFilterValueParameters, -) -from foundry.models.invalid_property_filters_combination import InvalidPropertyFiltersCombination -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) -from foundry.models.invalid_property_type import InvalidPropertyType -from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters -from foundry.models.invalid_property_value import InvalidPropertyValue -from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters -from foundry.models.invalid_query_parameter_value import InvalidQueryParameterValue -from foundry.models.invalid_query_parameter_value_parameters import ( - InvalidQueryParameterValueParameters, -) -from foundry.models.invalid_range_query import InvalidRangeQuery -from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters -from foundry.models.invalid_sort_order import InvalidSortOrder -from foundry.models.invalid_sort_order_parameters import InvalidSortOrderParameters -from foundry.models.invalid_sort_type import InvalidSortType -from foundry.models.invalid_sort_type_parameters import InvalidSortTypeParameters -from foundry.models.invalid_transaction_type import InvalidTransactionType -from foundry.models.invalid_transaction_type_parameters import InvalidTransactionTypeParameters -from foundry.models.invalid_user_id import InvalidUserId -from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters -from foundry.models.language_model_source import LanguageModelSource -from foundry.models.language_model_source_not_supported import LanguageModelSourceNotSupported -from foundry.models.language_model_source_not_supported_parameters import ( - LanguageModelSourceNotSupportedParameters, -) from foundry.models.line_string import LineString -from foundry.models.link_already_exists import LinkAlreadyExists -from foundry.models.link_type_not_found import LinkTypeNotFound -from foundry.models.link_type_not_found_parameters import LinkTypeNotFoundParameters from foundry.models.link_type_side import LinkTypeSide from foundry.models.link_type_side_cardinality import LinkTypeSideCardinality from foundry.models.link_type_side_v2 import LinkTypeSideV2 -from foundry.models.linked_object_not_found import LinkedObjectNotFound -from foundry.models.linked_object_not_found_parameters import LinkedObjectNotFoundParameters from foundry.models.list_action_types_response import ListActionTypesResponse from foundry.models.list_action_types_response_v2 import ListActionTypesResponseV2 from foundry.models.list_branches_response import ListBranchesResponse @@ -233,31 +81,6 @@ from foundry.models.list_query_types_response_v2 import ListQueryTypesResponseV2 from foundry.models.logic_rule import LogicRule from foundry.models.long_type import LongType -from foundry.models.malformed_property_filters import MalformedPropertyFilters -from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters -from foundry.models.marketplace_action_mapping_not_found import MarketplaceActionMappingNotFound -from foundry.models.marketplace_action_mapping_not_found_parameters import ( - MarketplaceActionMappingNotFoundParameters, -) -from foundry.models.marketplace_installation_not_found import MarketplaceInstallationNotFound -from foundry.models.marketplace_installation_not_found_parameters import ( - MarketplaceInstallationNotFoundParameters, -) -from foundry.models.marketplace_link_mapping_not_found import MarketplaceLinkMappingNotFound -from foundry.models.marketplace_link_mapping_not_found_parameters import ( - MarketplaceLinkMappingNotFoundParameters, -) -from foundry.models.marketplace_object_mapping_not_found import MarketplaceObjectMappingNotFound -from foundry.models.marketplace_object_mapping_not_found_parameters import ( - MarketplaceObjectMappingNotFoundParameters, -) -from foundry.models.marketplace_query_mapping_not_found import MarketplaceQueryMappingNotFound -from foundry.models.marketplace_query_mapping_not_found_parameters import ( - MarketplaceQueryMappingNotFoundParameters, -) -from foundry.models.missing_parameter import MissingParameter -from foundry.models.missing_parameter_parameters import MissingParameterParameters -from foundry.models.missing_post_body import MissingPostBody from foundry.models.model_api_type import ModelApiArrayType from foundry.models.model_api_data_type import ModelApiDataType from foundry.models.model_api_type import ModelApiMapType @@ -270,110 +93,41 @@ from foundry.models.multi_line_string import MultiLineString from foundry.models.multi_point import MultiPoint from foundry.models.multi_polygon import MultiPolygon -from foundry.models.multiple_group_by_on_field_not_supported import ( - MultipleGroupByOnFieldNotSupported, -) -from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( - MultipleGroupByOnFieldNotSupportedParameters, -) -from foundry.models.multiple_property_values_not_supported import MultiplePropertyValuesNotSupported -from foundry.models.multiple_property_values_not_supported_parameters import ( - MultiplePropertyValuesNotSupportedParameters, -) from foundry.models.null_type import NullType -from foundry.models.object_already_exists import ObjectAlreadyExists -from foundry.models.object_changed import ObjectChanged -from foundry.models.object_not_found import ObjectNotFound -from foundry.models.object_not_found_parameters import ObjectNotFoundParameters from foundry.models.object_property_type import ObjectPropertyType from foundry.models.object_type import ObjectType -from foundry.models.object_type_not_found import ObjectTypeNotFound -from foundry.models.object_type_not_found_parameters import ObjectTypeNotFoundParameters -from foundry.models.object_type_not_synced import ObjectTypeNotSynced -from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters from foundry.models.object_type_v2 import ObjectTypeV2 from foundry.models.object_type_visibility import ObjectTypeVisibility from foundry.models.object_type_with_link import ObjectTypeWithLink -from foundry.models.objects_exceeded_limit import ObjectsExceededLimit from foundry.models.ontology import Ontology from foundry.models.ontology_data_type import OntologyArrayType from foundry.models.ontology_data_type import OntologyDataType -from foundry.models.ontology_edits_exceeded_limit import OntologyEditsExceededLimit -from foundry.models.ontology_edits_exceeded_limit_parameters import ( - OntologyEditsExceededLimitParameters, -) from foundry.models.ontology_full_metadata import OntologyFullMetadata from foundry.models.ontology_data_type import OntologyMapType -from foundry.models.ontology_not_found import OntologyNotFound -from foundry.models.ontology_not_found_parameters import OntologyNotFoundParameters from foundry.models.object_property_type import OntologyObjectArrayType from foundry.models.ontology_object_set_type import OntologyObjectSetType from foundry.models.ontology_object_type import OntologyObjectType from foundry.models.ontology_data_type import OntologySetType from foundry.models.ontology_data_type import OntologyStructField from foundry.models.ontology_data_type import OntologyStructType -from foundry.models.ontology_syncing import OntologySyncing from foundry.models.ontology_v2 import OntologyV2 -from foundry.models.open_transaction_already_exists import OpenTransactionAlreadyExists -from foundry.models.operation_not_found import OperationNotFound -from foundry.models.operation_not_found_parameters import OperationNotFoundParameters from foundry.models.parameter import Parameter -from foundry.models.parameter_object_not_found import ParameterObjectNotFound -from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters -from foundry.models.parameter_object_set_rid_not_found import ParameterObjectSetRidNotFound -from foundry.models.parameter_object_set_rid_not_found_parameters import ( - ParameterObjectSetRidNotFoundParameters, -) -from foundry.models.parameter_type_not_supported import ParameterTypeNotSupported -from foundry.models.parameter_type_not_supported_parameters import ( - ParameterTypeNotSupportedParameters, -) -from foundry.models.parameters_not_found import ParametersNotFound -from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters -from foundry.models.parent_attachment_permission_denied import ParentAttachmentPermissionDenied from foundry.models.polygon import Polygon -from foundry.models.properties_not_filterable import PropertiesNotFilterable -from foundry.models.properties_not_found import PropertiesNotFound -from foundry.models.properties_not_found_parameters import PropertiesNotFoundParameters -from foundry.models.properties_not_searchable import PropertiesNotSearchable -from foundry.models.properties_not_searchable_parameters import PropertiesNotSearchableParameters -from foundry.models.properties_not_sortable import PropertiesNotSortable -from foundry.models.property_api_name_not_found import PropertyApiNameNotFound -from foundry.models.property_api_name_not_found_parameters import PropertyApiNameNotFoundParameters -from foundry.models.property_base_type_not_supported import PropertyBaseTypeNotSupported -from foundry.models.property_filters_not_supported import PropertyFiltersNotSupported -from foundry.models.property_types_search_not_supported import PropertyTypesSearchNotSupported -from foundry.models.property_types_search_not_supported_parameters import ( - PropertyTypesSearchNotSupportedParameters, -) from foundry.models.property_v2 import PropertyV2 -from foundry.models.put_schema_permission_denied import PutSchemaPermissionDenied from foundry.models.query_aggregation_key_type import QueryAggregationKeyType from foundry.models.query_aggregation_range_sub_type import QueryAggregationRangeSubType from foundry.models.query_aggregation_range_type import QueryAggregationRangeType from foundry.models.query_aggregation_value_type import QueryAggregationValueType from foundry.models.query_data_type import QueryArrayType from foundry.models.query_data_type import QueryDataType -from foundry.models.query_encountered_user_facing_error import QueryEncounteredUserFacingError -from foundry.models.query_memory_exceeded_limit import QueryMemoryExceededLimit -from foundry.models.query_not_found import QueryNotFound -from foundry.models.query_not_found_parameters import QueryNotFoundParameters from foundry.models.query_parameter_v2 import QueryParameterV2 from foundry.models.query_data_type import QuerySetType from foundry.models.query_data_type import QueryStructField from foundry.models.query_data_type import QueryStructType -from foundry.models.query_time_exceeded_limit import QueryTimeExceededLimit from foundry.models.query_type import QueryType from foundry.models.query_type_v2 import QueryTypeV2 from foundry.models.query_data_type import QueryUnionType -from foundry.models.read_table_permission_denied import ReadTablePermissionDenied from foundry.models.release_status import ReleaseStatus -from foundry.models.resource_name_already_exists import ResourceNameAlreadyExists -from foundry.models.resource_name_already_exists_parameters import ( - ResourceNameAlreadyExistsParameters, -) -from foundry.models.return_edits_mode import ReturnEditsMode -from foundry.models.schema_not_found import SchemaNotFound from foundry.models.short_type import ShortType from foundry.models.string_type import StringType from foundry.models.table_export_format import TableExportFormat @@ -382,18 +136,7 @@ from foundry.models.timeseries_type import TimeseriesType from foundry.models.timestamp_type import TimestampType from foundry.models.transaction import Transaction -from foundry.models.transaction_not_committed import TransactionNotCommitted -from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters -from foundry.models.transaction_not_found import TransactionNotFound -from foundry.models.transaction_not_open import TransactionNotOpen from foundry.models.transaction_status import TransactionStatus from foundry.models.transaction_type import TransactionType from foundry.models.two_dimensional_aggregation import TwoDimensionalAggregation -from foundry.models.unknown_distance_unit import UnknownDistanceUnit -from foundry.models.unknown_distance_unit_parameters import UnknownDistanceUnitParameters -from foundry.models.unknown_parameter import UnknownParameter -from foundry.models.unknown_parameter_parameters import UnknownParameterParameters -from foundry.models.unsupported_object_set import UnsupportedObjectSet from foundry.models.unsupported_type import UnsupportedType -from foundry.models.upload_file_permission_denied import UploadFilePermissionDenied -from foundry.models.view_object_permission_denied import ViewObjectPermissionDenied diff --git a/foundry/models/abort_transaction_permission_denied.py b/foundry/models/abort_transaction_permission_denied.py deleted file mode 100644 index 9b3ebe1a5..000000000 --- a/foundry/models/abort_transaction_permission_denied.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) -from typing_extensions import Self - - -class AbortTransactionPermissionDenied(BaseModel): - """ - The provided token does not have permission to abort the given treansaction on the given dataset. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AbortTransactionPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/abort_transaction_permission_denied_parameters.py b/foundry/models/abort_transaction_permission_denied_parameters.py deleted file mode 100644 index 89968491b..000000000 --- a/foundry/models/abort_transaction_permission_denied_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class AbortTransactionPermissionDeniedParameters(BaseModel): - """ - AbortTransactionPermissionDeniedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) - __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AbortTransactionPermissionDeniedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_contains_duplicate_edits.py b/foundry/models/action_contains_duplicate_edits.py deleted file mode 100644 index a891efb5e..000000000 --- a/foundry/models/action_contains_duplicate_edits.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ActionContainsDuplicateEdits(BaseModel): - """ - The given action request has multiple edits on the same object. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionContainsDuplicateEdits from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_edited_properties_not_found.py b/foundry/models/action_edited_properties_not_found.py deleted file mode 100644 index 2c39dd26d..000000000 --- a/foundry/models/action_edited_properties_not_found.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ActionEditedPropertiesNotFound(BaseModel): - """ - Actions attempted to edit properties that could not be found on the object type. Please contact the Ontology administrator to resolve this issue. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionEditedPropertiesNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_not_found.py b/foundry/models/action_not_found.py deleted file mode 100644 index 8ceec7a04..000000000 --- a/foundry/models/action_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.action_not_found_parameters import ActionNotFoundParameters -from typing_extensions import Self - - -class ActionNotFound(BaseModel): - """ - The action is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ActionNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_not_found_parameters.py b/foundry/models/action_not_found_parameters.py deleted file mode 100644 index 1d9dbea66..000000000 --- a/foundry/models/action_not_found_parameters.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ActionNotFoundParameters(BaseModel): - """ - ActionNotFoundParameters - """ # noqa: E501 - - action_rid: StrictStr = Field( - description="The unique resource identifier for an action.", alias="actionRid" - ) - __properties: ClassVar[Set[str]] = set(("actionRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_parameter_object_not_found.py b/foundry/models/action_parameter_object_not_found.py deleted file mode 100644 index 91bcb8568..000000000 --- a/foundry/models/action_parameter_object_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) -from typing_extensions import Self - - -class ActionParameterObjectNotFound(BaseModel): - """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionParameterObjectNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_parameter_object_not_found_parameters.py b/foundry/models/action_parameter_object_not_found_parameters.py deleted file mode 100644 index 2c239aca5..000000000 --- a/foundry/models/action_parameter_object_not_found_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ActionParameterObjectNotFoundParameters(BaseModel): - """ - ActionParameterObjectNotFoundParameters - """ # noqa: E501 - - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - __properties: ClassVar[Set[str]] = set(("parameterId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionParameterObjectNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_parameter_object_type_not_found.py b/foundry/models/action_parameter_object_type_not_found.py deleted file mode 100644 index a45b5f511..000000000 --- a/foundry/models/action_parameter_object_type_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.action_parameter_object_not_found_parameters import ( - ActionParameterObjectNotFoundParameters, -) -from typing_extensions import Self - - -class ActionParameterObjectTypeNotFound(BaseModel): - """ - The parameter references an object type that could not be found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ActionParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionParameterObjectTypeNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_parameter_type.py b/foundry/models/action_parameter_type.py index 4382384ba..d3047d036 100644 --- a/foundry/models/action_parameter_type.py +++ b/foundry/models/action_parameter_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -58,13 +57,17 @@ class ActionParameterArrayType(BaseModel): """ ActionParameterArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ActionParameterType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,12 +95,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -109,15 +113,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ActionParameterArrayType.model_rebuild(raise_errors=False) @@ -125,22 +128,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Action parameters. """ -ActionParameterType = Annotated[ - Union[ - ActionParameterArrayType, - AttachmentType, - BooleanType, - DateType, - DoubleType, - IntegerType, - LongType, - OntologyObjectSetType, - OntologyObjectType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +ActionParameterType = Annotated[Union[ActionParameterArrayType, AttachmentType, BooleanType, DateType, DoubleType, IntegerType, LongType, OntologyObjectSetType, OntologyObjectType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/action_parameter_v2.py b/foundry/models/action_parameter_v2.py index a8cf43560..fd2e2b039 100644 --- a/foundry/models/action_parameter_v2.py +++ b/foundry/models/action_parameter_v2.py @@ -38,18 +38,21 @@ from foundry.models.action_parameter_type import ActionParameterType from typing_extensions import Self - class ActionParameterV2(BaseModel): """ Details about a parameter of an action. - """ # noqa: E501 - + """ # noqa: E501 data_type: ActionParameterType = Field(alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("dataType", "description", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -94,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type.py b/foundry/models/action_type.py index 1a2ae8b78..2dea4d907 100644 --- a/foundry/models/action_type.py +++ b/foundry/models/action_type.py @@ -40,31 +40,25 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ActionType(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field( - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " - ) + rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -101,14 +96,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict["operations"] = _items + _dict['operations'] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -120,10 +115,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_type_not_found.py b/foundry/models/action_type_not_found.py deleted file mode 100644 index bf51a0561..000000000 --- a/foundry/models/action_type_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.action_type_not_found_parameters import ActionTypeNotFoundParameters -from typing_extensions import Self - - -class ActionTypeNotFound(BaseModel): - """ - The action type is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ActionTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionTypeNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_type_not_found_parameters.py b/foundry/models/action_type_not_found_parameters.py deleted file mode 100644 index 454b740d3..000000000 --- a/foundry/models/action_type_not_found_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ActionTypeNotFoundParameters(BaseModel): - """ - ActionTypeNotFoundParameters - """ # noqa: E501 - - action_type: Optional[StrictStr] = Field( - default=None, - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ", - ) - __properties: ClassVar[Set[str]] = set(("actionType", "rid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionTypeNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_type_v2.py b/foundry/models/action_type_v2.py index e3aa44e3e..89dc9d56b 100644 --- a/foundry/models/action_type_v2.py +++ b/foundry/models/action_type_v2.py @@ -40,31 +40,25 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ActionTypeV2(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, ActionParameterV2]] = None - rid: StrictStr = Field( - description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " - ) + rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -92,7 +86,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -101,14 +96,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict["operations"] = _items + _dict['operations'] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -120,10 +115,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/action_validation_failed.py b/foundry/models/action_validation_failed.py deleted file mode 100644 index 29a6353e1..000000000 --- a/foundry/models/action_validation_failed.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.action_validation_failed_parameters import ActionValidationFailedParameters -from typing_extensions import Self - - -class ActionValidationFailed(BaseModel): - """ - The validation failed for the given action parameters. Please use the `validateAction` endpoint for more details. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ActionValidationFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionValidationFailed from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/action_validation_failed_parameters.py b/foundry/models/action_validation_failed_parameters.py deleted file mode 100644 index e8aad9946..000000000 --- a/foundry/models/action_validation_failed_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ActionValidationFailedParameters(BaseModel): - """ - ActionValidationFailedParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - __properties: ClassVar[Set[str]] = set(("actionType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ActionValidationFailedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/aggregation_group_count_exceeded_limit.py b/foundry/models/aggregation_group_count_exceeded_limit.py deleted file mode 100644 index 625d67d1a..000000000 --- a/foundry/models/aggregation_group_count_exceeded_limit.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.aggregation_group_count_exceeded_limit_parameters import ( - AggregationGroupCountExceededLimitParameters, -) -from typing_extensions import Self - - -class AggregationGroupCountExceededLimit(BaseModel): - """ - The number of groups in the aggregations grouping exceeded the allowed limit. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AggregationGroupCountExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AggregationGroupCountExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py b/foundry/models/aggregation_group_count_exceeded_limit_parameters.py deleted file mode 100644 index ae15bd296..000000000 --- a/foundry/models/aggregation_group_count_exceeded_limit_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictInt -from pydantic import Field -from typing_extensions import Self - - -class AggregationGroupCountExceededLimitParameters(BaseModel): - """ - AggregationGroupCountExceededLimitParameters - """ # noqa: E501 - - groups_count: StrictInt = Field(alias="groupsCount") - groups_limit: StrictInt = Field(alias="groupsLimit") - __properties: ClassVar[Set[str]] = set(("groupsCount", "groupsLimit")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AggregationGroupCountExceededLimitParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/any_type.py b/foundry/models/any_type.py index ce427655c..10570a86e 100644 --- a/foundry/models/any_type.py +++ b/foundry/models/any_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class AnyType(BaseModel): """ AnyType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["any"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/api_feature_preview_usage_only.py b/foundry/models/api_feature_preview_usage_only.py deleted file mode 100644 index ccf7e5597..000000000 --- a/foundry/models/api_feature_preview_usage_only.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ApiFeaturePreviewUsageOnly(BaseModel): - """ - This feature is only supported in preview mode. Please use `preview=true` in the query parameters to call this endpoint. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ApiFeaturePreviewUsageOnly from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/api_usage_denied.py b/foundry/models/api_usage_denied.py deleted file mode 100644 index 6e15bc1ba..000000000 --- a/foundry/models/api_usage_denied.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ApiUsageDenied(BaseModel): - """ - You are not allowed to use Palantir APIs. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ApiUsageDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/apply_action_failed.py b/foundry/models/apply_action_failed.py deleted file mode 100644 index 5cb2926d2..000000000 --- a/foundry/models/apply_action_failed.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ApplyActionFailed(BaseModel): - """ - ApplyActionFailed - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ApplyActionFailed from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/apply_action_mode.py b/foundry/models/apply_action_mode.py deleted file mode 100644 index fd8b9a240..000000000 --- a/foundry/models/apply_action_mode.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ApplyActionMode(str, Enum): - """ - ApplyActionMode - """ - - """ - allowed enum values - """ - VALIDATE_ONLY = "VALIDATE_ONLY" - VALIDATE_AND_EXECUTE = "VALIDATE_AND_EXECUTE" - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ApplyActionMode from a JSON string""" - return cls(json.loads(json_str)) diff --git a/foundry/models/apply_action_request_options.py b/foundry/models/apply_action_request_options.py deleted file mode 100644 index 48985b8ed..000000000 --- a/foundry/models/apply_action_request_options.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel -from pydantic import Field -from foundry.models.apply_action_mode import ApplyActionMode -from foundry.models.return_edits_mode import ReturnEditsMode -from typing_extensions import Self - - -class ApplyActionRequestOptions(BaseModel): - """ - ApplyActionRequestOptions - """ # noqa: E501 - - mode: Optional[ApplyActionMode] = None - return_edits: Optional[ReturnEditsMode] = Field(default=None, alias="returnEdits") - __properties: ClassVar[Set[str]] = set(("mode", "returnEdits")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ApplyActionRequestOptions from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/async_operation_error.py b/foundry/models/async_operation_error.py deleted file mode 100644 index 74402d49d..000000000 --- a/foundry/models/async_operation_error.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class AsyncOperationError(BaseModel): - """ - AsyncOperationError - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Optional[Dict[str, Any]] = None - type: StrictStr - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters", "type") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AsyncOperationError from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/attachment_not_found.py b/foundry/models/attachment_not_found.py deleted file mode 100644 index 5860ea802..000000000 --- a/foundry/models/attachment_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.attachment_not_found_parameters import AttachmentNotFoundParameters -from typing_extensions import Self - - -class AttachmentNotFound(BaseModel): - """ - The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AttachmentNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AttachmentNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/attachment_not_found_parameters.py b/foundry/models/attachment_not_found_parameters.py deleted file mode 100644 index 7a5c75897..000000000 --- a/foundry/models/attachment_not_found_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class AttachmentNotFoundParameters(BaseModel): - """ - AttachmentNotFoundParameters - """ # noqa: E501 - - attachment_rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an attachment.", - alias="attachmentRid", - ) - __properties: ClassVar[Set[str]] = set(("attachmentRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AttachmentNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/attachment_size_exceeded_limit.py b/foundry/models/attachment_size_exceeded_limit.py deleted file mode 100644 index 75fcdf86f..000000000 --- a/foundry/models/attachment_size_exceeded_limit.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.attachment_size_exceeded_limit_parameters import ( - AttachmentSizeExceededLimitParameters, -) -from typing_extensions import Self - - -class AttachmentSizeExceededLimit(BaseModel): - """ - The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AttachmentSizeExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AttachmentSizeExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/attachment_size_exceeded_limit_parameters.py b/foundry/models/attachment_size_exceeded_limit_parameters.py deleted file mode 100644 index ec02b6093..000000000 --- a/foundry/models/attachment_size_exceeded_limit_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class AttachmentSizeExceededLimitParameters(BaseModel): - """ - AttachmentSizeExceededLimitParameters - """ # noqa: E501 - - file_limit_bytes: StrictStr = Field(alias="fileLimitBytes") - file_size_bytes: StrictStr = Field(alias="fileSizeBytes") - __properties: ClassVar[Set[str]] = set(("fileLimitBytes", "fileSizeBytes")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of AttachmentSizeExceededLimitParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/attachment_type.py b/foundry/models/attachment_type.py index cbbc0ae12..a04411be2 100644 --- a/foundry/models/attachment_type.py +++ b/foundry/models/attachment_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class AttachmentType(BaseModel): """ AttachmentType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["attachment"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/binary_type.py b/foundry/models/binary_type.py index d888061ee..5a37e1fbb 100644 --- a/foundry/models/binary_type.py +++ b/foundry/models/binary_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class BinaryType(BaseModel): """ BinaryType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["binary"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/boolean_type.py b/foundry/models/boolean_type.py index dd8f859e1..75696aa62 100644 --- a/foundry/models/boolean_type.py +++ b/foundry/models/boolean_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class BooleanType(BaseModel): """ BooleanType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["boolean"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch.py b/foundry/models/branch.py index 0f9602f90..d41fcc346 100644 --- a/foundry/models/branch.py +++ b/foundry/models/branch.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class Branch(BaseModel): """ - A Branch of a Dataset. - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + A Branch of a Dataset. + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/branch_already_exists.py b/foundry/models/branch_already_exists.py deleted file mode 100644 index 3efa70292..000000000 --- a/foundry/models/branch_already_exists.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class BranchAlreadyExists(BaseModel): - """ - The branch cannot be created because a branch with that name already exists. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of BranchAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/branch_already_exists_parameters.py b/foundry/models/branch_already_exists_parameters.py deleted file mode 100644 index 10ac0dd0a..000000000 --- a/foundry/models/branch_already_exists_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class BranchAlreadyExistsParameters(BaseModel): - """ - BranchAlreadyExistsParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of BranchAlreadyExistsParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/branch_not_found.py b/foundry/models/branch_not_found.py deleted file mode 100644 index c03116508..000000000 --- a/foundry/models/branch_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class BranchNotFound(BaseModel): - """ - The requested branch could not be found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of BranchNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/byte_type.py b/foundry/models/byte_type.py index badc2ce42..cec878ca5 100644 --- a/foundry/models/byte_type.py +++ b/foundry/models/byte_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class ByteType(BaseModel): """ ByteType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["byte"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/column_types_not_supported.py b/foundry/models/column_types_not_supported.py deleted file mode 100644 index b9ccf6936..000000000 --- a/foundry/models/column_types_not_supported.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters -from typing_extensions import Self - - -class ColumnTypesNotSupported(BaseModel): - """ - The dataset contains column types that are not supported. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ColumnTypesNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/column_types_not_supported_parameters.py b/foundry/models/column_types_not_supported_parameters.py deleted file mode 100644 index f57ddc868..000000000 --- a/foundry/models/column_types_not_supported_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ColumnTypesNotSupportedParameters(BaseModel): - """ - ColumnTypesNotSupportedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - __properties: ClassVar[Set[str]] = set(("datasetRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ColumnTypesNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/commit_transaction_permission_denied.py b/foundry/models/commit_transaction_permission_denied.py deleted file mode 100644 index 08b57adc6..000000000 --- a/foundry/models/commit_transaction_permission_denied.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) -from typing_extensions import Self - - -class CommitTransactionPermissionDenied(BaseModel): - """ - The provided token does not have permission to commit the given treansaction on the given dataset. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CommitTransactionPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/composite_primary_key_not_supported.py b/foundry/models/composite_primary_key_not_supported.py deleted file mode 100644 index 4f74a5d32..000000000 --- a/foundry/models/composite_primary_key_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.composite_primary_key_not_supported_parameters import ( - CompositePrimaryKeyNotSupportedParameters, -) -from typing_extensions import Self - - -class CompositePrimaryKeyNotSupported(BaseModel): - """ - Primary keys consisting of multiple properties are not supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: CompositePrimaryKeyNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CompositePrimaryKeyNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/composite_primary_key_not_supported_parameters.py b/foundry/models/composite_primary_key_not_supported_parameters.py deleted file mode 100644 index 3a3326fcc..000000000 --- a/foundry/models/composite_primary_key_not_supported_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class CompositePrimaryKeyNotSupportedParameters(BaseModel): - """ - CompositePrimaryKeyNotSupportedParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - primary_key: Optional[List[StrictStr]] = Field(default=None, alias="primaryKey") - __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CompositePrimaryKeyNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/create_branch_permission_denied.py b/foundry/models/create_branch_permission_denied.py deleted file mode 100644 index 7d9b31ddf..000000000 --- a/foundry/models/create_branch_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class CreateBranchPermissionDenied(BaseModel): - """ - The provided token does not have permission to create a branch of this dataset. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CreateBranchPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/create_branch_request.py b/foundry/models/create_branch_request.py index 6f7623934..52b191af8 100644 --- a/foundry/models/create_branch_request.py +++ b/foundry/models/create_branch_request.py @@ -37,23 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateBranchRequest(BaseModel): """ CreateBranchRequest - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + """ # noqa: E501 + branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") + transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_dataset_permission_denied.py b/foundry/models/create_dataset_permission_denied.py deleted file mode 100644 index 2039003ab..000000000 --- a/foundry/models/create_dataset_permission_denied.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.create_dataset_permission_denied_parameters import ( - CreateDatasetPermissionDeniedParameters, -) -from typing_extensions import Self - - -class CreateDatasetPermissionDenied(BaseModel): - """ - The provided token does not have permission to create a dataset in this folder. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: CreateDatasetPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CreateDatasetPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/create_dataset_permission_denied_parameters.py b/foundry/models/create_dataset_permission_denied_parameters.py deleted file mode 100644 index 8e2b85ef2..000000000 --- a/foundry/models/create_dataset_permission_denied_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class CreateDatasetPermissionDeniedParameters(BaseModel): - """ - CreateDatasetPermissionDeniedParameters - """ # noqa: E501 - - name: StrictStr - parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CreateDatasetPermissionDeniedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/create_dataset_request.py b/foundry/models/create_dataset_request.py index 0bf237dba..d3cf06cf4 100644 --- a/foundry/models/create_dataset_request.py +++ b/foundry/models/create_dataset_request.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateDatasetRequest(BaseModel): """ CreateDatasetRequest - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_link_rule.py b/foundry/models/create_link_rule.py index fd8a583bc..1f9a47132 100644 --- a/foundry/models/create_link_rule.py +++ b/foundry/models/create_link_rule.py @@ -37,40 +37,23 @@ from pydantic import Field from typing_extensions import Self - class CreateLinkRule(BaseModel): """ CreateLinkRule - """ # noqa: E501 - - a_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="aSideObjectTypeApiName", - ) - b_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="bSideObjectTypeApiName", - ) - link_type_api_name_ato_b: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameAtoB", - ) - link_type_api_name_bto_a: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameBtoA", - ) + """ # noqa: E501 + a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") + b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") + link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") + link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") type: Literal["createLink"] - __properties: ClassVar[Set[str]] = set( - ( - "aSideObjectTypeApiName", - "bSideObjectTypeApiName", - "linkTypeApiNameAtoB", - "linkTypeApiNameBtoA", - "type", - ) - ) + __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -98,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -112,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_object_rule.py b/foundry/models/create_object_rule.py index c919864c2..e8a7d0d60 100644 --- a/foundry/models/create_object_rule.py +++ b/foundry/models/create_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class CreateObjectRule(BaseModel): """ CreateObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["createObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/create_transaction_permission_denied.py b/foundry/models/create_transaction_permission_denied.py deleted file mode 100644 index 13c4e42c0..000000000 --- a/foundry/models/create_transaction_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class CreateTransactionPermissionDenied(BaseModel): - """ - The provided token does not have permission to create a transaction on this dataset. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of CreateTransactionPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/create_transaction_request.py b/foundry/models/create_transaction_request.py index 0cc10b315..26017acdd 100644 --- a/foundry/models/create_transaction_request.py +++ b/foundry/models/create_transaction_request.py @@ -38,16 +38,19 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self - class CreateTransactionRequest(BaseModel): """ CreateTransactionRequest - """ # noqa: E501 - + """ # noqa: E501 transaction_type: Optional[TransactionType] = Field(default=None, alias="transactionType") __properties: ClassVar[Set[str]] = set(("transactionType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/dataset.py b/foundry/models/dataset.py index c1dcdc38a..288d147f1 100644 --- a/foundry/models/dataset.py +++ b/foundry/models/dataset.py @@ -37,20 +37,21 @@ from pydantic import Field from typing_extensions import Self - class Dataset(BaseModel): """ Dataset - """ # noqa: E501 - + """ # noqa: E501 name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. " - ) + rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/dataset_not_found.py b/foundry/models/dataset_not_found.py deleted file mode 100644 index 8e6486693..000000000 --- a/foundry/models/dataset_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters -from typing_extensions import Self - - -class DatasetNotFound(BaseModel): - """ - The requested dataset could not be found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DatasetNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/date_type.py b/foundry/models/date_type.py index 1bbdd31db..e8abd589e 100644 --- a/foundry/models/date_type.py +++ b/foundry/models/date_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class DateType(BaseModel): """ DateType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["date"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/decimal_type.py b/foundry/models/decimal_type.py index 34aae5518..d8f60d6b4 100644 --- a/foundry/models/decimal_type.py +++ b/foundry/models/decimal_type.py @@ -36,18 +36,21 @@ from pydantic import BaseModel, StrictInt, StrictStr from typing_extensions import Self - class DecimalType(BaseModel): """ DecimalType - """ # noqa: E501 - + """ # noqa: E501 precision: Optional[StrictInt] = None scale: Optional[StrictInt] = None type: Literal["decimal"] __properties: ClassVar[Set[str]] = set(("precision", "scale", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_branch_permission_denied.py b/foundry/models/delete_branch_permission_denied.py deleted file mode 100644 index a34182ff1..000000000 --- a/foundry/models/delete_branch_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class DeleteBranchPermissionDenied(BaseModel): - """ - The provided token does not have permission to delete the given branch from this dataset. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeleteBranchPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/delete_link_rule.py b/foundry/models/delete_link_rule.py index 6aec5cbd3..f0e9c0e93 100644 --- a/foundry/models/delete_link_rule.py +++ b/foundry/models/delete_link_rule.py @@ -37,40 +37,23 @@ from pydantic import Field from typing_extensions import Self - class DeleteLinkRule(BaseModel): """ DeleteLinkRule - """ # noqa: E501 - - a_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="aSideObjectTypeApiName", - ) - b_side_object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="bSideObjectTypeApiName", - ) - link_type_api_name_ato_b: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameAtoB", - ) - link_type_api_name_bto_a: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkTypeApiNameBtoA", - ) + """ # noqa: E501 + a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") + b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") + link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") + link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") type: Literal["deleteLink"] - __properties: ClassVar[Set[str]] = set( - ( - "aSideObjectTypeApiName", - "bSideObjectTypeApiName", - "linkTypeApiNameAtoB", - "linkTypeApiNameBtoA", - "type", - ) - ) + __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -98,7 +81,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -112,10 +96,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_object_rule.py b/foundry/models/delete_object_rule.py index fe26fc3ad..f5cb7d5c6 100644 --- a/foundry/models/delete_object_rule.py +++ b/foundry/models/delete_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class DeleteObjectRule(BaseModel): """ DeleteObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["deleteObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/delete_schema_permission_denied.py b/foundry/models/delete_schema_permission_denied.py deleted file mode 100644 index 58c4ee9f7..000000000 --- a/foundry/models/delete_schema_permission_denied.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) -from typing_extensions import Self - - -class DeleteSchemaPermissionDenied(BaseModel): - """ - todo - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeleteSchemaPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/delete_schema_permission_denied_parameters.py b/foundry/models/delete_schema_permission_denied_parameters.py deleted file mode 100644 index d26476e56..000000000 --- a/foundry/models/delete_schema_permission_denied_parameters.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class DeleteSchemaPermissionDeniedParameters(BaseModel): - """ - DeleteSchemaPermissionDeniedParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) - __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "transactionRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeleteSchemaPermissionDeniedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/deployment_api.py b/foundry/models/deployment_api.py index 776d26b5f..b055aa824 100644 --- a/foundry/models/deployment_api.py +++ b/foundry/models/deployment_api.py @@ -37,16 +37,19 @@ from foundry.models.deployment_transform_api import DeploymentTransformApi from typing_extensions import Self - class DeploymentApi(BaseModel): """ DeploymentApi - """ # noqa: E501 - + """ # noqa: E501 transform: Optional[DeploymentTransformApi] = None __properties: ClassVar[Set[str]] = set(("transform")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,12 +77,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of transform if self.transform: - _dict["transform"] = self.transform.to_dict() + _dict['transform'] = self.transform.to_dict() return _dict @classmethod @@ -91,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_listing.py b/foundry/models/deployment_listing.py index 0b9104f0f..5ab91945d 100644 --- a/foundry/models/deployment_listing.py +++ b/foundry/models/deployment_listing.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class DeploymentListing(BaseModel): """ - Name and description associated with a model deployment. - """ # noqa: E501 - + Name and description associated with a model deployment. + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field( - default=None, - description="A description or explanation of what this model deployment does and is intended to be used for. ", - ) + description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") __properties: ClassVar[Set[str]] = set(("apiName", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_metadata.py b/foundry/models/deployment_metadata.py index fd9aa9f5b..e44bf62a6 100644 --- a/foundry/models/deployment_metadata.py +++ b/foundry/models/deployment_metadata.py @@ -38,21 +38,21 @@ from foundry.models.deployment_api import DeploymentApi from typing_extensions import Self - class DeploymentMetadata(BaseModel): """ - Metadata related to a model deployment. - """ # noqa: E501 - + Metadata related to a model deployment. + """ # noqa: E501 api: DeploymentApi api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field( - default=None, - description="A description or explanation of what this model deployment does and is intended to be used for. ", - ) + description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") __properties: ClassVar[Set[str]] = set(("api", "apiName", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of api if self.api: - _dict["api"] = self.api.to_dict() + _dict['api'] = self.api.to_dict() return _dict @classmethod @@ -97,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/deployment_not_available.py b/foundry/models/deployment_not_available.py deleted file mode 100644 index 660e9f308..000000000 --- a/foundry/models/deployment_not_available.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters -from typing_extensions import Self - - -class DeploymentNotAvailable(BaseModel): - """ - The requested model deployment does not have a model deployed. It may be disabled or failed. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INTERNAL"): - raise ValueError("must be one of enum values ('INTERNAL')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeploymentNotAvailable from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/deployment_not_available_parameters.py b/foundry/models/deployment_not_available_parameters.py deleted file mode 100644 index da3af960d..000000000 --- a/foundry/models/deployment_not_available_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class DeploymentNotAvailableParameters(BaseModel): - """ - DeploymentNotAvailableParameters - """ # noqa: E501 - - deployment_api_name: Optional[StrictStr] = Field(default=None, alias="deploymentApiName") - ontology_api_name: Optional[StrictStr] = Field(default=None, alias="ontologyApiName") - __properties: ClassVar[Set[str]] = set(("deploymentApiName", "ontologyApiName")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeploymentNotAvailableParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/deployment_not_found.py b/foundry/models/deployment_not_found.py deleted file mode 100644 index 3b96a2ba6..000000000 --- a/foundry/models/deployment_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.deployment_not_available_parameters import DeploymentNotAvailableParameters -from typing_extensions import Self - - -class DeploymentNotFound(BaseModel): - """ - The requested model deployment is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DeploymentNotAvailableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DeploymentNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/deployment_transform_api.py b/foundry/models/deployment_transform_api.py index 513847265..120aa6c4a 100644 --- a/foundry/models/deployment_transform_api.py +++ b/foundry/models/deployment_transform_api.py @@ -37,17 +37,20 @@ from foundry.models.model_api_data_type import ModelApiDataType from typing_extensions import Self - class DeploymentTransformApi(BaseModel): """ DeploymentTransformApi - """ # noqa: E501 - + """ # noqa: E501 inputs: Optional[List[ModelApiDataType]] = None outputs: Optional[List[ModelApiDataType]] = None __properties: ClassVar[Set[str]] = set(("inputs", "outputs")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) @@ -84,14 +88,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict["inputs"] = _items + _dict['inputs'] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict["outputs"] = _items + _dict['outputs'] = _items return _dict @classmethod @@ -103,10 +107,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/distance_unit.py b/foundry/models/distance_unit.py deleted file mode 100644 index b4ecca5eb..000000000 --- a/foundry/models/distance_unit.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class DistanceUnit(str, Enum): - """ - DistanceUnit - """ - - """ - allowed enum values - """ - MILLIMETERS = "MILLIMETERS" - CENTIMETERS = "CENTIMETERS" - METERS = "METERS" - KILOMETERS = "KILOMETERS" - INCHES = "INCHES" - FEET = "FEET" - YARDS = "YARDS" - MILES = "MILES" - NAUTICAL_MILES = "NAUTICAL_MILES" - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DistanceUnit from a JSON string""" - return cls(json.loads(json_str)) diff --git a/foundry/models/double_type.py b/foundry/models/double_type.py index e21985eea..4587f19a0 100644 --- a/foundry/models/double_type.py +++ b/foundry/models/double_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class DoubleType(BaseModel): """ DoubleType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["double"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/duplicate_order_by.py b/foundry/models/duplicate_order_by.py deleted file mode 100644 index 7a2d230ca..000000000 --- a/foundry/models/duplicate_order_by.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters -from typing_extensions import Self - - -class DuplicateOrderBy(BaseModel): - """ - The requested sort order includes duplicate properties. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DuplicateOrderBy from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/duplicate_order_by_parameters.py b/foundry/models/duplicate_order_by_parameters.py deleted file mode 100644 index 17379dc39..000000000 --- a/foundry/models/duplicate_order_by_parameters.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from typing_extensions import Self - - -class DuplicateOrderByParameters(BaseModel): - """ - DuplicateOrderByParameters - """ # noqa: E501 - - properties: Optional[List[StrictStr]] = None - __properties: ClassVar[Set[str]] = set(("properties")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of DuplicateOrderByParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/edit_object_permission_denied.py b/foundry/models/edit_object_permission_denied.py deleted file mode 100644 index eaadf3947..000000000 --- a/foundry/models/edit_object_permission_denied.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class EditObjectPermissionDenied(BaseModel): - """ - The user does not have permission to edit this `ObjectType`. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of EditObjectPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file.py b/foundry/models/file.py index 916489615..c0cd32d99 100644 --- a/foundry/models/file.py +++ b/foundry/models/file.py @@ -37,24 +37,22 @@ from pydantic import Field from typing_extensions import Self - class File(BaseModel): """ File - """ # noqa: E501 - - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) + """ # noqa: E501 + path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") size_bytes: Optional[StrictStr] = Field(default=None, alias="sizeBytes") - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) + transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") updated_time: datetime = Field(alias="updatedTime") __properties: ClassVar[Set[str]] = set(("path", "sizeBytes", "transactionRid", "updatedTime")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/file_already_exists.py b/foundry/models/file_already_exists.py deleted file mode 100644 index fb959ec25..000000000 --- a/foundry/models/file_already_exists.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters -from typing_extensions import Self - - -class FileAlreadyExists(BaseModel): - """ - The given file path already exists in the dataset and transaction. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file_already_exists_parameters.py b/foundry/models/file_already_exists_parameters.py deleted file mode 100644 index 10d369996..000000000 --- a/foundry/models/file_already_exists_parameters.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FileAlreadyExistsParameters(BaseModel): - """ - FileAlreadyExistsParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) - __properties: ClassVar[Set[str]] = set(("datasetRid", "path", "transactionRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileAlreadyExistsParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file_not_found_on_branch.py b/foundry/models/file_not_found_on_branch.py deleted file mode 100644 index a0f9169f1..000000000 --- a/foundry/models/file_not_found_on_branch.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.file_not_found_on_branch_parameters import FileNotFoundOnBranchParameters -from typing_extensions import Self - - -class FileNotFoundOnBranch(BaseModel): - """ - The requested file could not be found on the given branch, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FileNotFoundOnBranchParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileNotFoundOnBranch from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file_not_found_on_branch_parameters.py b/foundry/models/file_not_found_on_branch_parameters.py deleted file mode 100644 index 024f93200..000000000 --- a/foundry/models/file_not_found_on_branch_parameters.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FileNotFoundOnBranchParameters(BaseModel): - """ - FileNotFoundOnBranchParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) - __properties: ClassVar[Set[str]] = set(("branchId", "datasetRid", "path")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileNotFoundOnBranchParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file_not_found_on_transaction_range.py b/foundry/models/file_not_found_on_transaction_range.py deleted file mode 100644 index c95454870..000000000 --- a/foundry/models/file_not_found_on_transaction_range.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.file_not_found_on_transaction_range_parameters import ( - FileNotFoundOnTransactionRangeParameters, -) -from typing_extensions import Self - - -class FileNotFoundOnTransactionRange(BaseModel): - """ - The requested file could not be found on the given transaction range, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FileNotFoundOnTransactionRangeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileNotFoundOnTransactionRange from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/file_not_found_on_transaction_range_parameters.py b/foundry/models/file_not_found_on_transaction_range_parameters.py deleted file mode 100644 index 7a9fb4715..000000000 --- a/foundry/models/file_not_found_on_transaction_range_parameters.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FileNotFoundOnTransactionRangeParameters(BaseModel): - """ - FileNotFoundOnTransactionRangeParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - end_transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="endTransactionRid", - ) - path: StrictStr = Field( - description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " - ) - start_transaction_rid: Optional[StrictStr] = Field( - default=None, - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="startTransactionRid", - ) - __properties: ClassVar[Set[str]] = set( - ("datasetRid", "endTransactionRid", "path", "startTransactionRid") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FileNotFoundOnTransactionRangeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/float_type.py b/foundry/models/float_type.py index 3313f6848..adf518340 100644 --- a/foundry/models/float_type.py +++ b/foundry/models/float_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class FloatType(BaseModel): """ FloatType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["float"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/folder_not_found.py b/foundry/models/folder_not_found.py deleted file mode 100644 index f8abb6129..000000000 --- a/foundry/models/folder_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.folder_not_found_parameters import FolderNotFoundParameters -from typing_extensions import Self - - -class FolderNotFound(BaseModel): - """ - The requested folder could not be found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FolderNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FolderNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/folder_not_found_parameters.py b/foundry/models/folder_not_found_parameters.py deleted file mode 100644 index 860693282..000000000 --- a/foundry/models/folder_not_found_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FolderNotFoundParameters(BaseModel): - """ - FolderNotFoundParameters - """ # noqa: E501 - - folder_rid: StrictStr = Field(alias="folderRid") - __properties: ClassVar[Set[str]] = set(("folderRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FolderNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_encountered_user_facing_error.py b/foundry/models/function_encountered_user_facing_error.py deleted file mode 100644 index 50076d8e4..000000000 --- a/foundry/models/function_encountered_user_facing_error.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) -from typing_extensions import Self - - -class FunctionEncounteredUserFacingError(BaseModel): - """ - The authored function failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionEncounteredUserFacingError from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_encountered_user_facing_error_parameters.py b/foundry/models/function_encountered_user_facing_error_parameters.py deleted file mode 100644 index 6f5303fff..000000000 --- a/foundry/models/function_encountered_user_facing_error_parameters.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FunctionEncounteredUserFacingErrorParameters(BaseModel): - """ - FunctionEncounteredUserFacingErrorParameters - """ # noqa: E501 - - function_rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", - alias="functionRid", - ) - function_version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", - alias="functionVersion", - ) - message: StrictStr - __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion", "message")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionEncounteredUserFacingErrorParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_execution_failed.py b/foundry/models/function_execution_failed.py deleted file mode 100644 index cb8c810b2..000000000 --- a/foundry/models/function_execution_failed.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from typing_extensions import Self - - -class FunctionExecutionFailed(BaseModel): - """ - FunctionExecutionFailed - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionExecutionFailed from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_execution_failed_parameters.py b/foundry/models/function_execution_failed_parameters.py deleted file mode 100644 index 769169fb8..000000000 --- a/foundry/models/function_execution_failed_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class FunctionExecutionFailedParameters(BaseModel): - """ - FunctionExecutionFailedParameters - """ # noqa: E501 - - function_rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ", - alias="functionRid", - ) - function_version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ", - alias="functionVersion", - ) - __properties: ClassVar[Set[str]] = set(("functionRid", "functionVersion")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionExecutionFailedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_execution_timed_out.py b/foundry/models/function_execution_timed_out.py deleted file mode 100644 index e76a3c19d..000000000 --- a/foundry/models/function_execution_timed_out.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from typing_extensions import Self - - -class FunctionExecutionTimedOut(BaseModel): - """ - FunctionExecutionTimedOut - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("TIMEOUT"): - raise ValueError("must be one of enum values ('TIMEOUT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionExecutionTimedOut from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/function_invalid_input.py b/foundry/models/function_invalid_input.py deleted file mode 100644 index 3d1f3bfaf..000000000 --- a/foundry/models/function_invalid_input.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from typing_extensions import Self - - -class FunctionInvalidInput(BaseModel): - """ - FunctionInvalidInput - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of FunctionInvalidInput from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/geo_point.py b/foundry/models/geo_point.py index 84d761d0e..64aaa9148 100644 --- a/foundry/models/geo_point.py +++ b/foundry/models/geo_point.py @@ -38,25 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class GeoPoint(BaseModel): """ GeoPoint - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] = Field( - description='GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ' - ) + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)] = Field(description="GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as \"M\") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ") type: Literal["Point"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -98,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geo_point_type.py b/foundry/models/geo_point_type.py index c5becf4c9..46d10da35 100644 --- a/foundry/models/geo_point_type.py +++ b/foundry/models/geo_point_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class GeoPointType(BaseModel): """ GeoPointType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["geopoint"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geo_shape_type.py b/foundry/models/geo_shape_type.py index a75faa14c..d848b9d8d 100644 --- a/foundry/models/geo_shape_type.py +++ b/foundry/models/geo_shape_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class GeoShapeType(BaseModel): """ GeoShapeType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["geoshape"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/geometry.py b/foundry/models/geometry.py index 6627faffe..175e23cf4 100644 --- a/foundry/models/geometry.py +++ b/foundry/models/geometry.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -55,18 +54,19 @@ class GeometryCollection(BaseModel): """ - GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) + GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") geometries: Optional[Annotated[List[Geometry], Field(min_length=0)]] = None type: Literal["GeometryCollection"] __properties: ClassVar[Set[str]] = set(("bbox", "geometries", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -94,7 +94,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in geometries (list) @@ -103,7 +104,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.geometries: if _item: _items.append(_item.to_dict()) - _dict["geometries"] = _items + _dict['geometries'] = _items return _dict @classmethod @@ -115,15 +116,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors GeometryCollection.model_rebuild(raise_errors=False) @@ -131,12 +131,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ Abstract type for all GeoJSon object except Feature and FeatureCollection """ -Geometry = Annotated[ - Union[ - GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon - ], - Field(discriminator="type"), -] +Geometry = Annotated[Union[GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/integer_type.py b/foundry/models/integer_type.py index 6ce6dd4a2..38440b840 100644 --- a/foundry/models/integer_type.py +++ b/foundry/models/integer_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class IntegerType(BaseModel): """ IntegerType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["integer"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/invalid_aggregation_range.py b/foundry/models/invalid_aggregation_range.py deleted file mode 100644 index ff243ca3f..000000000 --- a/foundry/models/invalid_aggregation_range.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class InvalidAggregationRange(BaseModel): - """ - Aggregation range should include one lt or lte and one gt or gte. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidAggregationRange from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_aggregation_range_property_type.py b/foundry/models/invalid_aggregation_range_property_type.py deleted file mode 100644 index fb7d53033..000000000 --- a/foundry/models/invalid_aggregation_range_property_type.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) -from typing_extensions import Self - - -class InvalidAggregationRangePropertyType(BaseModel): - """ - Range group by is not supported by property type. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidAggregationRangePropertyType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_aggregation_range_property_type_parameters.py b/foundry/models/invalid_aggregation_range_property_type_parameters.py deleted file mode 100644 index 368d0e0e9..000000000 --- a/foundry/models/invalid_aggregation_range_property_type_parameters.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidAggregationRangePropertyTypeParameters(BaseModel): - """ - InvalidAggregationRangePropertyTypeParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - __properties: ClassVar[Set[str]] = set(("objectType", "property", "propertyBaseType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidAggregationRangePropertyTypeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_aggregation_range_value.py b/foundry/models/invalid_aggregation_range_value.py deleted file mode 100644 index 358a55662..000000000 --- a/foundry/models/invalid_aggregation_range_value.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) -from typing_extensions import Self - - -class InvalidAggregationRangeValue(BaseModel): - """ - Aggregation value does not conform to the expected underlying type. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidAggregationRangeValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_apply_action_option_combination.py b/foundry/models/invalid_apply_action_option_combination.py deleted file mode 100644 index 74149e7f6..000000000 --- a/foundry/models/invalid_apply_action_option_combination.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_apply_action_option_combination_parameters import ( - InvalidApplyActionOptionCombinationParameters, -) -from typing_extensions import Self - - -class InvalidApplyActionOptionCombination(BaseModel): - """ - The given options are individually valid but cannot be used in the given combination. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidApplyActionOptionCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidApplyActionOptionCombination from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_apply_action_option_combination_parameters.py b/foundry/models/invalid_apply_action_option_combination_parameters.py deleted file mode 100644 index 0f1d3ffa6..000000000 --- a/foundry/models/invalid_apply_action_option_combination_parameters.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel -from pydantic import Field -from foundry.models.apply_action_request_options import ApplyActionRequestOptions -from typing_extensions import Self - - -class InvalidApplyActionOptionCombinationParameters(BaseModel): - """ - InvalidApplyActionOptionCombinationParameters - """ # noqa: E501 - - invalid_combination: Optional[ApplyActionRequestOptions] = Field( - default=None, alias="invalidCombination" - ) - __properties: ClassVar[Set[str]] = set(("invalidCombination")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidApplyActionOptionCombinationParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of invalid_combination - if self.invalid_combination: - _dict["invalidCombination"] = self.invalid_combination.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_branch_id.py b/foundry/models/invalid_branch_id.py deleted file mode 100644 index 77099becb..000000000 --- a/foundry/models/invalid_branch_id.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_branch_id_parameters import InvalidBranchIdParameters -from typing_extensions import Self - - -class InvalidBranchId(BaseModel): - """ - The requested branch name cannot be used. Branch names cannot be empty and must not look like RIDs or UUIDs. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidBranchIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidBranchId from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_branch_id_parameters.py b/foundry/models/invalid_branch_id_parameters.py deleted file mode 100644 index 5eb54cdfe..000000000 --- a/foundry/models/invalid_branch_id_parameters.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidBranchIdParameters(BaseModel): - """ - InvalidBranchIdParameters - """ # noqa: E501 - - branch_id: StrictStr = Field( - description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" - ) - __properties: ClassVar[Set[str]] = set(("branchId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidBranchIdParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_content_length.py b/foundry/models/invalid_content_length.py deleted file mode 100644 index 9d25acaab..000000000 --- a/foundry/models/invalid_content_length.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class InvalidContentLength(BaseModel): - """ - A `Content-Length` header is required for all uploads, but was missing or invalid. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidContentLength from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_content_type.py b/foundry/models/invalid_content_type.py deleted file mode 100644 index d2e459938..000000000 --- a/foundry/models/invalid_content_type.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class InvalidContentType(BaseModel): - """ - The `Content-Type` cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidContentType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_duration_group_by_property_type.py b/foundry/models/invalid_duration_group_by_property_type.py deleted file mode 100644 index 0fae64627..000000000 --- a/foundry/models/invalid_duration_group_by_property_type.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) -from typing_extensions import Self - - -class InvalidDurationGroupByPropertyType(BaseModel): - """ - Invalid property type for duration groupBy. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidDurationGroupByPropertyType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_duration_group_by_value.py b/foundry/models/invalid_duration_group_by_value.py deleted file mode 100644 index bff8707a7..000000000 --- a/foundry/models/invalid_duration_group_by_value.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class InvalidDurationGroupByValue(BaseModel): - """ - Duration groupBy value is invalid. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidDurationGroupByValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_fields.py b/foundry/models/invalid_fields.py deleted file mode 100644 index 1967c9125..000000000 --- a/foundry/models/invalid_fields.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_fields_parameters import InvalidFieldsParameters -from typing_extensions import Self - - -class InvalidFields(BaseModel): - """ - TBD - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidFieldsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidFields from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_fields_parameters.py b/foundry/models/invalid_fields_parameters.py deleted file mode 100644 index 3b7864e7c..000000000 --- a/foundry/models/invalid_fields_parameters.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from typing_extensions import Self - - -class InvalidFieldsParameters(BaseModel): - """ - InvalidFieldsParameters - """ # noqa: E501 - - properties: Optional[List[StrictStr]] = None - __properties: ClassVar[Set[str]] = set(("properties")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidFieldsParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_group_id.py b/foundry/models/invalid_group_id.py deleted file mode 100644 index 2216627ed..000000000 --- a/foundry/models/invalid_group_id.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_group_id_parameters import InvalidGroupIdParameters -from typing_extensions import Self - - -class InvalidGroupId(BaseModel): - """ - The provided value for a group id must be a UUID. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidGroupIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidGroupId from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_group_id_parameters.py b/foundry/models/invalid_group_id_parameters.py deleted file mode 100644 index d4d3e24a8..000000000 --- a/foundry/models/invalid_group_id_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidGroupIdParameters(BaseModel): - """ - InvalidGroupIdParameters - """ # noqa: E501 - - group_id: StrictStr = Field(alias="groupId") - __properties: ClassVar[Set[str]] = set(("groupId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidGroupIdParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_page_size.py b/foundry/models/invalid_page_size.py deleted file mode 100644 index e5d8f9382..000000000 --- a/foundry/models/invalid_page_size.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_page_size_parameters import InvalidPageSizeParameters -from typing_extensions import Self - - -class InvalidPageSize(BaseModel): - """ - The provided page size was zero or negative. Page sizes must be greater than zero. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPageSizeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPageSize from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_page_size_parameters.py b/foundry/models/invalid_page_size_parameters.py deleted file mode 100644 index 333e9781d..000000000 --- a/foundry/models/invalid_page_size_parameters.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictInt -from pydantic import Field -from typing_extensions import Self - - -class InvalidPageSizeParameters(BaseModel): - """ - InvalidPageSizeParameters - """ # noqa: E501 - - page_size: StrictInt = Field( - description="The page size to use for the endpoint.", alias="pageSize" - ) - __properties: ClassVar[Set[str]] = set(("pageSize")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPageSizeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_page_token.py b/foundry/models/invalid_page_token.py deleted file mode 100644 index dd1379125..000000000 --- a/foundry/models/invalid_page_token.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_page_token_parameters import InvalidPageTokenParameters -from typing_extensions import Self - - -class InvalidPageToken(BaseModel): - """ - The provided page token could not be used to retrieve the next page of results. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPageTokenParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPageToken from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_page_token_parameters.py b/foundry/models/invalid_page_token_parameters.py deleted file mode 100644 index cddf43ace..000000000 --- a/foundry/models/invalid_page_token_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidPageTokenParameters(BaseModel): - """ - InvalidPageTokenParameters - """ # noqa: E501 - - page_token: StrictStr = Field( - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="pageToken", - ) - __properties: ClassVar[Set[str]] = set(("pageToken")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPageTokenParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_parameter_combination.py b/foundry/models/invalid_parameter_combination.py deleted file mode 100644 index 04114118e..000000000 --- a/foundry/models/invalid_parameter_combination.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_parameter_combination_parameters import ( - InvalidParameterCombinationParameters, -) -from typing_extensions import Self - - -class InvalidParameterCombination(BaseModel): - """ - The given parameters are individually valid but cannot be used in the given combination. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidParameterCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidParameterCombination from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_parameter_combination_parameters.py b/foundry/models/invalid_parameter_combination_parameters.py deleted file mode 100644 index 1251ee3ba..000000000 --- a/foundry/models/invalid_parameter_combination_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidParameterCombinationParameters(BaseModel): - """ - InvalidParameterCombinationParameters - """ # noqa: E501 - - provided_parameters: Optional[List[StrictStr]] = Field(default=None, alias="providedParameters") - valid_combinations: Optional[List[List[StrictStr]]] = Field( - default=None, alias="validCombinations" - ) - __properties: ClassVar[Set[str]] = set(("providedParameters", "validCombinations")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidParameterCombinationParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_parameter_value.py b/foundry/models/invalid_parameter_value.py deleted file mode 100644 index 75c84c8c2..000000000 --- a/foundry/models/invalid_parameter_value.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_parameter_value_parameters import InvalidParameterValueParameters -from typing_extensions import Self - - -class InvalidParameterValue(BaseModel): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidParameterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidParameterValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_parameter_value_parameters.py b/foundry/models/invalid_parameter_value_parameters.py deleted file mode 100644 index 9c7bc62ea..000000000 --- a/foundry/models/invalid_parameter_value_parameters.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from foundry.models.ontology_data_type import OntologyDataType -from typing_extensions import Self - - -class InvalidParameterValueParameters(BaseModel): - """ - InvalidParameterValueParameters - """ # noqa: E501 - - parameter_base_type: Optional[StrictStr] = Field( - default=None, - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="parameterBaseType", - ) - parameter_data_type: Optional[OntologyDataType] = Field(default=None, alias="parameterDataType") - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - parameter_value: Optional[Any] = Field( - default=None, - description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="parameterValue", - ) - __properties: ClassVar[Set[str]] = set( - ("parameterBaseType", "parameterDataType", "parameterId", "parameterValue") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidParameterValueParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameter_data_type - if self.parameter_data_type: - _dict["parameterDataType"] = self.parameter_data_type.to_dict() - # set to None if parameter_value (nullable) is None - # and model_fields_set contains the field - if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict["parameterValue"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_filter_value.py b/foundry/models/invalid_property_filter_value.py deleted file mode 100644 index ab6167a84..000000000 --- a/foundry/models/invalid_property_filter_value.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_property_filter_value_parameters import ( - InvalidPropertyFilterValueParameters, -) -from typing_extensions import Self - - -class InvalidPropertyFilterValue(BaseModel): - """ - The value of the given property filter is invalid. For instance, 2 is an invalid value for `isNull` in `properties.address.isNull=2` because the `isNull` filter expects a value of boolean type. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPropertyFilterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyFilterValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_filter_value_parameters.py b/foundry/models/invalid_property_filter_value_parameters.py deleted file mode 100644 index b1a888290..000000000 --- a/foundry/models/invalid_property_filter_value_parameters.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidPropertyFilterValueParameters(BaseModel): - """ - InvalidPropertyFilterValueParameters - """ # noqa: E501 - - expected_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="expectedType", - ) - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_filter: StrictStr = Field( - description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', - alias="propertyFilter", - ) - property_filter_value: StrictStr = Field( - description="Represents the value of a property filter. For instance, false is the FilterValue in `properties.{propertyApiName}.isNull=false`. ", - alias="propertyFilterValue", - ) - __properties: ClassVar[Set[str]] = set( - ("expectedType", "property", "propertyFilter", "propertyFilterValue") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyFilterValueParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_filters_combination.py b/foundry/models/invalid_property_filters_combination.py deleted file mode 100644 index 682490f3e..000000000 --- a/foundry/models/invalid_property_filters_combination.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) -from typing_extensions import Self - - -class InvalidPropertyFiltersCombination(BaseModel): - """ - The provided filters cannot be used together. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyFiltersCombination from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_filters_combination_parameters.py b/foundry/models/invalid_property_filters_combination_parameters.py deleted file mode 100644 index 90d8fb411..000000000 --- a/foundry/models/invalid_property_filters_combination_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidPropertyFiltersCombinationParameters(BaseModel): - """ - InvalidPropertyFiltersCombinationParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_filters: Optional[List[StrictStr]] = Field(default=None, alias="propertyFilters") - __properties: ClassVar[Set[str]] = set(("property", "propertyFilters")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyFiltersCombinationParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_type.py b/foundry/models/invalid_property_type.py deleted file mode 100644 index 1ae77a83a..000000000 --- a/foundry/models/invalid_property_type.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_property_type_parameters import InvalidPropertyTypeParameters -from typing_extensions import Self - - -class InvalidPropertyType(BaseModel): - """ - The given property type is not of the expected type. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_type_parameters.py b/foundry/models/invalid_property_type_parameters.py deleted file mode 100644 index 8637e8f47..000000000 --- a/foundry/models/invalid_property_type_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidPropertyTypeParameters(BaseModel): - """ - InvalidPropertyTypeParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyTypeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_value.py b/foundry/models/invalid_property_value.py deleted file mode 100644 index 16e16b0a8..000000000 --- a/foundry/models/invalid_property_value.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_property_value_parameters import InvalidPropertyValueParameters -from typing_extensions import Self - - -class InvalidPropertyValue(BaseModel): - """ - The value of the given property is invalid. See the documentation of `PropertyValue` for details on how properties are represented. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPropertyValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_property_value_parameters.py b/foundry/models/invalid_property_value_parameters.py deleted file mode 100644 index 5abae0b81..000000000 --- a/foundry/models/invalid_property_value_parameters.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidPropertyValueParameters(BaseModel): - """ - InvalidPropertyValueParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - property_value: Optional[Any] = Field( - description='Represents the value of a property in the following format. | Type | JSON encoding | Example | |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Double | number | `3.14159265` | | Float | number | `3.14159265` | | GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | | GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="propertyValue", - ) - __properties: ClassVar[Set[str]] = set(("property", "propertyBaseType", "propertyValue")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidPropertyValueParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # set to None if property_value (nullable) is None - # and model_fields_set contains the field - if self.property_value is None and "property_value" in self.model_fields_set: - _dict["propertyValue"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_query_parameter_value.py b/foundry/models/invalid_query_parameter_value.py deleted file mode 100644 index 4bca54e40..000000000 --- a/foundry/models/invalid_query_parameter_value.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_query_parameter_value_parameters import ( - InvalidQueryParameterValueParameters, -) -from typing_extensions import Self - - -class InvalidQueryParameterValue(BaseModel): - """ - The value of the given parameter is invalid. See the documentation of `DataValue` for details on how parameters are represented. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidQueryParameterValueParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidQueryParameterValue from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_query_parameter_value_parameters.py b/foundry/models/invalid_query_parameter_value_parameters.py deleted file mode 100644 index e73dde6c9..000000000 --- a/foundry/models/invalid_query_parameter_value_parameters.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from foundry.models.query_data_type import QueryDataType -from typing_extensions import Self - - -class InvalidQueryParameterValueParameters(BaseModel): - """ - InvalidQueryParameterValueParameters - """ # noqa: E501 - - parameter_data_type: QueryDataType = Field(alias="parameterDataType") - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - parameter_value: Optional[Any] = Field( - default=None, - description='Represents the value of data in the following format. Note that these values can be nested, for example an array of structs. | Type | JSON encoding | Example | |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| | Array | array | `["alpha", "bravo", "charlie"]` | | Attachment | string | `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | | Boolean | boolean | `true` | | Byte | number | `31` | | Date | ISO 8601 extended local date string | `"2021-05-01"` | | Decimal | string | `"2.718281828"` | | Float | number | `3.14159265` | | Double | number | `3.14159265` | | Integer | number | `238940` | | Long | string | `"58319870951433"` | | Null | null | `null` | | Object Set | string | `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| | Ontology Object Reference | JSON encoding of the object\'s primary key | `10033123` or `"EMP1234"` | | Set | array | `["alpha", "bravo", "charlie"]` | | Short | number | `8739` | | String | string | `"Call me Ishmael"` | | Struct | JSON object | `{"name": "John Doe", "age": 42}` | | TwoDimensionalAggregation | JSON object | `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` | | ThreeDimensionalAggregation | JSON object | `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | ', - alias="parameterValue", - ) - __properties: ClassVar[Set[str]] = set(("parameterDataType", "parameterId", "parameterValue")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidQueryParameterValueParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameter_data_type - if self.parameter_data_type: - _dict["parameterDataType"] = self.parameter_data_type.to_dict() - # set to None if parameter_value (nullable) is None - # and model_fields_set contains the field - if self.parameter_value is None and "parameter_value" in self.model_fields_set: - _dict["parameterValue"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_range_query.py b/foundry/models/invalid_range_query.py deleted file mode 100644 index 878fafb39..000000000 --- a/foundry/models/invalid_range_query.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_range_query_parameters import InvalidRangeQueryParameters -from typing_extensions import Self - - -class InvalidRangeQuery(BaseModel): - """ - The specified query range filter is invalid. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidRangeQueryParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidRangeQuery from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_range_query_parameters.py b/foundry/models/invalid_range_query_parameters.py deleted file mode 100644 index f8b6d3b15..000000000 --- a/foundry/models/invalid_range_query_parameters.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidRangeQueryParameters(BaseModel): - """ - InvalidRangeQueryParameters - """ # noqa: E501 - - field: StrictStr - gt: Optional[Any] = Field(default=None, description="Greater than") - gte: Optional[Any] = Field(default=None, description="Greater than or equal") - lt: Optional[Any] = Field(default=None, description="Less than") - lte: Optional[Any] = Field(default=None, description="Less than or equal") - __properties: ClassVar[Set[str]] = set(("field", "gt", "gte", "lt", "lte")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidRangeQueryParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # set to None if gt (nullable) is None - # and model_fields_set contains the field - if self.gt is None and "gt" in self.model_fields_set: - _dict["gt"] = None - - # set to None if gte (nullable) is None - # and model_fields_set contains the field - if self.gte is None and "gte" in self.model_fields_set: - _dict["gte"] = None - - # set to None if lt (nullable) is None - # and model_fields_set contains the field - if self.lt is None and "lt" in self.model_fields_set: - _dict["lt"] = None - - # set to None if lte (nullable) is None - # and model_fields_set contains the field - if self.lte is None and "lte" in self.model_fields_set: - _dict["lte"] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_sort_order.py b/foundry/models/invalid_sort_order.py deleted file mode 100644 index e1a4f2f8c..000000000 --- a/foundry/models/invalid_sort_order.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_sort_order_parameters import InvalidSortOrderParameters -from typing_extensions import Self - - -class InvalidSortOrder(BaseModel): - """ - The requested sort order of one or more properties is invalid. Valid sort orders are 'asc' or 'desc'. Sort order can also be omitted, and defaults to 'asc'. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidSortOrderParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidSortOrder from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_sort_order_parameters.py b/foundry/models/invalid_sort_order_parameters.py deleted file mode 100644 index db39f0761..000000000 --- a/foundry/models/invalid_sort_order_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidSortOrderParameters(BaseModel): - """ - InvalidSortOrderParameters - """ # noqa: E501 - - invalid_sort_order: StrictStr = Field(alias="invalidSortOrder") - __properties: ClassVar[Set[str]] = set(("invalidSortOrder")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidSortOrderParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_sort_type.py b/foundry/models/invalid_sort_type.py deleted file mode 100644 index b6095826f..000000000 --- a/foundry/models/invalid_sort_type.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_sort_type_parameters import InvalidSortTypeParameters -from typing_extensions import Self - - -class InvalidSortType(BaseModel): - """ - The requested sort type of one or more clauses is invalid. Valid sort types are 'p' or 'properties'. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidSortTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidSortType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_sort_type_parameters.py b/foundry/models/invalid_sort_type_parameters.py deleted file mode 100644 index 09e94fc86..000000000 --- a/foundry/models/invalid_sort_type_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidSortTypeParameters(BaseModel): - """ - InvalidSortTypeParameters - """ # noqa: E501 - - invalid_sort_type: StrictStr = Field(alias="invalidSortType") - __properties: ClassVar[Set[str]] = set(("invalidSortType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidSortTypeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_transaction_type.py b/foundry/models/invalid_transaction_type.py deleted file mode 100644 index 3e104906e..000000000 --- a/foundry/models/invalid_transaction_type.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_transaction_type_parameters import InvalidTransactionTypeParameters -from typing_extensions import Self - - -class InvalidTransactionType(BaseModel): - """ - The given transaction type is not valid. Valid transaction types are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidTransactionTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidTransactionType from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_transaction_type_parameters.py b/foundry/models/invalid_transaction_type_parameters.py deleted file mode 100644 index 572d862aa..000000000 --- a/foundry/models/invalid_transaction_type_parameters.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from foundry.models.transaction_type import TransactionType -from typing_extensions import Self - - -class InvalidTransactionTypeParameters(BaseModel): - """ - InvalidTransactionTypeParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) - transaction_type: TransactionType = Field(alias="transactionType") - __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidTransactionTypeParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_user_id.py b/foundry/models/invalid_user_id.py deleted file mode 100644 index ce14408be..000000000 --- a/foundry/models/invalid_user_id.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_user_id_parameters import InvalidUserIdParameters -from typing_extensions import Self - - -class InvalidUserId(BaseModel): - """ - The provided value for a user id must be a UUID. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidUserIdParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidUserId from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/invalid_user_id_parameters.py b/foundry/models/invalid_user_id_parameters.py deleted file mode 100644 index 546bb942b..000000000 --- a/foundry/models/invalid_user_id_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class InvalidUserIdParameters(BaseModel): - """ - InvalidUserIdParameters - """ # noqa: E501 - - user_id: StrictStr = Field(alias="userId") - __properties: ClassVar[Set[str]] = set(("userId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of InvalidUserIdParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/language_model_source.py b/foundry/models/language_model_source.py deleted file mode 100644 index 616e2d62d..000000000 --- a/foundry/models/language_model_source.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class LanguageModelSource(str, Enum): - """ - LanguageModelSource - """ - - """ - allowed enum values - """ - GLOBAL = "global" - HOSTED = "hosted" - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of LanguageModelSource from a JSON string""" - return cls(json.loads(json_str)) diff --git a/foundry/models/language_model_source_not_supported.py b/foundry/models/language_model_source_not_supported.py deleted file mode 100644 index b92e0ba7d..000000000 --- a/foundry/models/language_model_source_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.language_model_source_not_supported_parameters import ( - LanguageModelSourceNotSupportedParameters, -) -from typing_extensions import Self - - -class LanguageModelSourceNotSupported(BaseModel): - """ - LanguageModelSourceNotSupported - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: LanguageModelSourceNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LanguageModelSourceNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/language_model_source_not_supported_parameters.py b/foundry/models/language_model_source_not_supported_parameters.py deleted file mode 100644 index f41860701..000000000 --- a/foundry/models/language_model_source_not_supported_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel -from foundry.models.language_model_source import LanguageModelSource -from typing_extensions import Self - - -class LanguageModelSourceNotSupportedParameters(BaseModel): - """ - LanguageModelSourceNotSupportedParameters - """ # noqa: E501 - - source: LanguageModelSource - __properties: ClassVar[Set[str]] = set(("source")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LanguageModelSourceNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/line_string.py b/foundry/models/line_string.py index 058a3caa6..b0648ddf4 100644 --- a/foundry/models/line_string.py +++ b/foundry/models/line_string.py @@ -38,29 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class LineString(BaseModel): """ LineString - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - Annotated[ - List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], - Field(min_length=2), - ] - ] = Field( - default=None, - description="GeoJSon fundamental geometry construct, array of two or more positions. ", - ) + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]] = Field(default=None, description="GeoJSon fundamental geometry construct, array of two or more positions. ") type: Literal["LineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -88,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -102,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_already_exists.py b/foundry/models/link_already_exists.py deleted file mode 100644 index c0be880f6..000000000 --- a/foundry/models/link_already_exists.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class LinkAlreadyExists(BaseModel): - """ - The link the user is attempting to create already exists. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LinkAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/link_type_not_found.py b/foundry/models/link_type_not_found.py deleted file mode 100644 index 4efbfa7e7..000000000 --- a/foundry/models/link_type_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.link_type_not_found_parameters import LinkTypeNotFoundParameters -from typing_extensions import Self - - -class LinkTypeNotFound(BaseModel): - """ - The link type is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: LinkTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LinkTypeNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/link_type_not_found_parameters.py b/foundry/models/link_type_not_found_parameters.py deleted file mode 100644 index 492460ebd..000000000 --- a/foundry/models/link_type_not_found_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class LinkTypeNotFoundParameters(BaseModel): - """ - LinkTypeNotFoundParameters - """ # noqa: E501 - - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - __properties: ClassVar[Set[str]] = set(("linkType", "objectType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LinkTypeNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/link_type_side.py b/foundry/models/link_type_side.py index 976573715..2ef43e8d0 100644 --- a/foundry/models/link_type_side.py +++ b/foundry/models/link_type_side.py @@ -39,42 +39,24 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class LinkTypeSide(BaseModel): """ LinkTypeSide - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - foreign_key_property_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="foreignKeyPropertyApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "cardinality", - "displayName", - "foreignKeyPropertyApiName", - "objectTypeApiName", - "status", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -116,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/link_type_side_cardinality.py b/foundry/models/link_type_side_cardinality.py index 54188958b..bf74fc408 100644 --- a/foundry/models/link_type_side_cardinality.py +++ b/foundry/models/link_type_side_cardinality.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,10 +48,12 @@ class LinkTypeSideCardinality(str, Enum): """ allowed enum values """ - ONE = "ONE" - MANY = "MANY" + ONE = 'ONE' + MANY = 'MANY' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LinkTypeSideCardinality from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/link_type_side_v2.py b/foundry/models/link_type_side_v2.py index f9b964386..5cffe22ba 100644 --- a/foundry/models/link_type_side_v2.py +++ b/foundry/models/link_type_side_v2.py @@ -39,42 +39,24 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class LinkTypeSideV2(BaseModel): """ LinkTypeSideV2 - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="apiName", - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - foreign_key_property_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="foreignKeyPropertyApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") status: ReleaseStatus - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "cardinality", - "displayName", - "foreignKeyPropertyApiName", - "objectTypeApiName", - "status", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -116,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/linked_object_not_found.py b/foundry/models/linked_object_not_found.py deleted file mode 100644 index aa5698483..000000000 --- a/foundry/models/linked_object_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.linked_object_not_found_parameters import LinkedObjectNotFoundParameters -from typing_extensions import Self - - -class LinkedObjectNotFound(BaseModel): - """ - The linked object with the given primary key is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: LinkedObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LinkedObjectNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/linked_object_not_found_parameters.py b/foundry/models/linked_object_not_found_parameters.py deleted file mode 100644 index 4bfb615a4..000000000 --- a/foundry/models/linked_object_not_found_parameters.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class LinkedObjectNotFoundParameters(BaseModel): - """ - LinkedObjectNotFoundParameters - """ # noqa: E501 - - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - linked_object_primary_key: Optional[Dict[str, Any]] = Field( - default=None, alias="linkedObjectPrimaryKey" - ) - linked_object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="linkedObjectType", - ) - __properties: ClassVar[Set[str]] = set( - ("linkType", "linkedObjectPrimaryKey", "linkedObjectType") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of LinkedObjectNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/list_action_types_response.py b/foundry/models/list_action_types_response.py index ddc1154aa..5764c23c5 100644 --- a/foundry/models/list_action_types_response.py +++ b/foundry/models/list_action_types_response.py @@ -38,21 +38,20 @@ from foundry.models.action_type import ActionType from typing_extensions import Self - class ListActionTypesResponse(BaseModel): """ ListActionTypesResponse - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[ActionType]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_action_types_response_v2.py b/foundry/models/list_action_types_response_v2.py index 8ec108e8e..8ade15754 100644 --- a/foundry/models/list_action_types_response_v2.py +++ b/foundry/models/list_action_types_response_v2.py @@ -38,21 +38,20 @@ from foundry.models.action_type_v2 import ActionTypeV2 from typing_extensions import Self - class ListActionTypesResponseV2(BaseModel): """ ListActionTypesResponseV2 - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[ActionTypeV2]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_branches_response.py b/foundry/models/list_branches_response.py index d6e2c905e..3927e363b 100644 --- a/foundry/models/list_branches_response.py +++ b/foundry/models/list_branches_response.py @@ -38,23 +38,20 @@ from foundry.models.branch import Branch from typing_extensions import Self - class ListBranchesResponse(BaseModel): """ ListBranchesResponse - """ # noqa: E501 - - data: Optional[List[Branch]] = Field( - default=None, description="The list of branches in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[Branch]] = Field(default=None, description="The list of branches in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_deployments_response.py b/foundry/models/list_deployments_response.py index 6c2537255..904c04b6f 100644 --- a/foundry/models/list_deployments_response.py +++ b/foundry/models/list_deployments_response.py @@ -37,16 +37,19 @@ from foundry.models.deployment_listing import DeploymentListing from typing_extensions import Self - class ListDeploymentsResponse(BaseModel): """ ListDeploymentsResponse - """ # noqa: E501 - + """ # noqa: E501 deployments: Optional[List[DeploymentListing]] = None __properties: ClassVar[Set[str]] = set(("deployments")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -74,7 +77,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in deployments (list) @@ -83,7 +87,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.deployments: if _item: _items.append(_item.to_dict()) - _dict["deployments"] = _items + _dict['deployments'] = _items return _dict @classmethod @@ -95,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_files_response.py b/foundry/models/list_files_response.py index 46b45e632..a58b7d14d 100644 --- a/foundry/models/list_files_response.py +++ b/foundry/models/list_files_response.py @@ -38,21 +38,20 @@ from foundry.models.file import File from typing_extensions import Self - class ListFilesResponse(BaseModel): """ A page of Files and an optional page token that can be used to retrieve the next page. - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[File]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_object_types_response.py b/foundry/models/list_object_types_response.py index d07e6618b..f21235de7 100644 --- a/foundry/models/list_object_types_response.py +++ b/foundry/models/list_object_types_response.py @@ -38,23 +38,20 @@ from foundry.models.object_type import ObjectType from typing_extensions import Self - class ListObjectTypesResponse(BaseModel): """ ListObjectTypesResponse - """ # noqa: E501 - - data: Optional[List[ObjectType]] = Field( - default=None, description="The list of object types in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[ObjectType]] = Field(default=None, description="The list of object types in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_object_types_v2_response.py b/foundry/models/list_object_types_v2_response.py index 9e963bb67..361d10991 100644 --- a/foundry/models/list_object_types_v2_response.py +++ b/foundry/models/list_object_types_v2_response.py @@ -38,23 +38,20 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self - class ListObjectTypesV2Response(BaseModel): """ ListObjectTypesV2Response - """ # noqa: E501 - - data: Optional[List[ObjectTypeV2]] = Field( - default=None, description="The list of object types in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[ObjectTypeV2]] = Field(default=None, description="The list of object types in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_ontologies_response.py b/foundry/models/list_ontologies_response.py index 7a83d1e54..5dc17ca14 100644 --- a/foundry/models/list_ontologies_response.py +++ b/foundry/models/list_ontologies_response.py @@ -38,18 +38,19 @@ from foundry.models.ontology import Ontology from typing_extensions import Self - class ListOntologiesResponse(BaseModel): """ ListOntologiesResponse - """ # noqa: E501 - - data: Optional[List[Ontology]] = Field( - default=None, description="The list of Ontologies the user has access to." - ) + """ # noqa: E501 + data: Optional[List[Ontology]] = Field(default=None, description="The list of Ontologies the user has access to.") __properties: ClassVar[Set[str]] = set(("data")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -86,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -98,10 +100,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_ontologies_v2_response.py b/foundry/models/list_ontologies_v2_response.py index 12b880f7c..262395847 100644 --- a/foundry/models/list_ontologies_v2_response.py +++ b/foundry/models/list_ontologies_v2_response.py @@ -38,18 +38,19 @@ from foundry.models.ontology_v2 import OntologyV2 from typing_extensions import Self - class ListOntologiesV2Response(BaseModel): """ ListOntologiesV2Response - """ # noqa: E501 - - data: Optional[List[OntologyV2]] = Field( - default=None, description="The list of Ontologies the user has access to." - ) + """ # noqa: E501 + data: Optional[List[OntologyV2]] = Field(default=None, description="The list of Ontologies the user has access to.") __properties: ClassVar[Set[str]] = set(("data")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -86,7 +88,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -98,10 +100,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_outgoing_link_types_response.py b/foundry/models/list_outgoing_link_types_response.py index 17e5d4a88..4ac325ce5 100644 --- a/foundry/models/list_outgoing_link_types_response.py +++ b/foundry/models/list_outgoing_link_types_response.py @@ -38,23 +38,20 @@ from foundry.models.link_type_side import LinkTypeSide from typing_extensions import Self - class ListOutgoingLinkTypesResponse(BaseModel): """ ListOutgoingLinkTypesResponse - """ # noqa: E501 - - data: Optional[List[LinkTypeSide]] = Field( - default=None, description="The list of link type sides in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[LinkTypeSide]] = Field(default=None, description="The list of link type sides in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_outgoing_link_types_response_v2.py b/foundry/models/list_outgoing_link_types_response_v2.py index 20abfd54f..d41bcdecf 100644 --- a/foundry/models/list_outgoing_link_types_response_v2.py +++ b/foundry/models/list_outgoing_link_types_response_v2.py @@ -38,23 +38,20 @@ from foundry.models.link_type_side_v2 import LinkTypeSideV2 from typing_extensions import Self - class ListOutgoingLinkTypesResponseV2(BaseModel): """ ListOutgoingLinkTypesResponseV2 - """ # noqa: E501 - - data: Optional[List[LinkTypeSideV2]] = Field( - default=None, description="The list of link type sides in the current page." - ) - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + """ # noqa: E501 + data: Optional[List[LinkTypeSideV2]] = Field(default=None, description="The list of link type sides in the current page.") + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -91,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -103,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_query_types_response.py b/foundry/models/list_query_types_response.py index e64275770..ff3697f04 100644 --- a/foundry/models/list_query_types_response.py +++ b/foundry/models/list_query_types_response.py @@ -38,21 +38,20 @@ from foundry.models.query_type import QueryType from typing_extensions import Self - class ListQueryTypesResponse(BaseModel): """ ListQueryTypesResponse - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[QueryType]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/list_query_types_response_v2.py b/foundry/models/list_query_types_response_v2.py index 090d061dd..54c39ce52 100644 --- a/foundry/models/list_query_types_response_v2.py +++ b/foundry/models/list_query_types_response_v2.py @@ -38,21 +38,20 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self - class ListQueryTypesResponseV2(BaseModel): """ ListQueryTypesResponseV2 - """ # noqa: E501 - + """ # noqa: E501 data: Optional[List[QueryTypeV2]] = None - next_page_token: Optional[StrictStr] = Field( - default=None, - description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", - alias="nextPageToken", - ) + next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict["data"] = _items + _dict['data'] = _items return _dict @classmethod @@ -101,10 +101,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/logic_rule.py b/foundry/models/logic_rule.py index 991de14ba..5948cca46 100644 --- a/foundry/models/logic_rule.py +++ b/foundry/models/logic_rule.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -47,13 +46,13 @@ from foundry.models.modify_object_rule import ModifyObjectRule + """ LogicRule """ -LogicRule = Annotated[ - Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], - Field(discriminator="type"), -] +LogicRule = Annotated[Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/long_type.py b/foundry/models/long_type.py index 24dd2e1c2..e2234d664 100644 --- a/foundry/models/long_type.py +++ b/foundry/models/long_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class LongType(BaseModel): """ LongType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["long"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/malformed_property_filters.py b/foundry/models/malformed_property_filters.py deleted file mode 100644 index b00ea444d..000000000 --- a/foundry/models/malformed_property_filters.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.malformed_property_filters_parameters import MalformedPropertyFiltersParameters -from typing_extensions import Self - - -class MalformedPropertyFilters(BaseModel): - """ - At least one of requested filters are malformed. Please look at the documentation of `PropertyFilter`. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MalformedPropertyFiltersParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MalformedPropertyFilters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/malformed_property_filters_parameters.py b/foundry/models/malformed_property_filters_parameters.py deleted file mode 100644 index 6557a1021..000000000 --- a/foundry/models/malformed_property_filters_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MalformedPropertyFiltersParameters(BaseModel): - """ - MalformedPropertyFiltersParameters - """ # noqa: E501 - - malformed_property_filter: StrictStr = Field(alias="malformedPropertyFilter") - __properties: ClassVar[Set[str]] = set(("malformedPropertyFilter")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MalformedPropertyFiltersParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_action_mapping_not_found.py b/foundry/models/marketplace_action_mapping_not_found.py deleted file mode 100644 index 7d0e335d5..000000000 --- a/foundry/models/marketplace_action_mapping_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.marketplace_action_mapping_not_found_parameters import ( - MarketplaceActionMappingNotFoundParameters, -) -from typing_extensions import Self - - -class MarketplaceActionMappingNotFound(BaseModel): - """ - The given action could not be mapped to a Marketplace installation. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MarketplaceActionMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceActionMappingNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_action_mapping_not_found_parameters.py b/foundry/models/marketplace_action_mapping_not_found_parameters.py deleted file mode 100644 index a2eac26be..000000000 --- a/foundry/models/marketplace_action_mapping_not_found_parameters.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MarketplaceActionMappingNotFoundParameters(BaseModel): - """ - MarketplaceActionMappingNotFoundParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - artifact_repository: StrictStr = Field(alias="artifactRepository") - package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set(("actionType", "artifactRepository", "packageName")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceActionMappingNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_installation_not_found.py b/foundry/models/marketplace_installation_not_found.py deleted file mode 100644 index 75edc706b..000000000 --- a/foundry/models/marketplace_installation_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.marketplace_installation_not_found_parameters import ( - MarketplaceInstallationNotFoundParameters, -) -from typing_extensions import Self - - -class MarketplaceInstallationNotFound(BaseModel): - """ - The given marketplace installation could not be found or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MarketplaceInstallationNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceInstallationNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_installation_not_found_parameters.py b/foundry/models/marketplace_installation_not_found_parameters.py deleted file mode 100644 index 182713213..000000000 --- a/foundry/models/marketplace_installation_not_found_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MarketplaceInstallationNotFoundParameters(BaseModel): - """ - MarketplaceInstallationNotFoundParameters - """ # noqa: E501 - - artifact_repository: StrictStr = Field(alias="artifactRepository") - package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceInstallationNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_link_mapping_not_found.py b/foundry/models/marketplace_link_mapping_not_found.py deleted file mode 100644 index a7e14c3f7..000000000 --- a/foundry/models/marketplace_link_mapping_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.marketplace_link_mapping_not_found_parameters import ( - MarketplaceLinkMappingNotFoundParameters, -) -from typing_extensions import Self - - -class MarketplaceLinkMappingNotFound(BaseModel): - """ - The given link could not be mapped to a Marketplace installation. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MarketplaceLinkMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceLinkMappingNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_link_mapping_not_found_parameters.py b/foundry/models/marketplace_link_mapping_not_found_parameters.py deleted file mode 100644 index aed6ec532..000000000 --- a/foundry/models/marketplace_link_mapping_not_found_parameters.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MarketplaceLinkMappingNotFoundParameters(BaseModel): - """ - MarketplaceLinkMappingNotFoundParameters - """ # noqa: E501 - - artifact_repository: StrictStr = Field(alias="artifactRepository") - link_type: StrictStr = Field( - description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", - alias="linkType", - ) - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set( - ("artifactRepository", "linkType", "objectType", "packageName") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceLinkMappingNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_object_mapping_not_found.py b/foundry/models/marketplace_object_mapping_not_found.py deleted file mode 100644 index 5545414bc..000000000 --- a/foundry/models/marketplace_object_mapping_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.marketplace_object_mapping_not_found_parameters import ( - MarketplaceObjectMappingNotFoundParameters, -) -from typing_extensions import Self - - -class MarketplaceObjectMappingNotFound(BaseModel): - """ - The given object could not be mapped to a Marketplace installation. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MarketplaceObjectMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceObjectMappingNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_object_mapping_not_found_parameters.py b/foundry/models/marketplace_object_mapping_not_found_parameters.py deleted file mode 100644 index 2a567dd80..000000000 --- a/foundry/models/marketplace_object_mapping_not_found_parameters.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MarketplaceObjectMappingNotFoundParameters(BaseModel): - """ - MarketplaceObjectMappingNotFoundParameters - """ # noqa: E501 - - artifact_repository: StrictStr = Field(alias="artifactRepository") - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - package_name: StrictStr = Field(alias="packageName") - __properties: ClassVar[Set[str]] = set(("artifactRepository", "objectType", "packageName")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceObjectMappingNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_query_mapping_not_found.py b/foundry/models/marketplace_query_mapping_not_found.py deleted file mode 100644 index 81c489b37..000000000 --- a/foundry/models/marketplace_query_mapping_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.marketplace_query_mapping_not_found_parameters import ( - MarketplaceQueryMappingNotFoundParameters, -) -from typing_extensions import Self - - -class MarketplaceQueryMappingNotFound(BaseModel): - """ - The given query could not be mapped to a Marketplace installation. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MarketplaceQueryMappingNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceQueryMappingNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/marketplace_query_mapping_not_found_parameters.py b/foundry/models/marketplace_query_mapping_not_found_parameters.py deleted file mode 100644 index fcb37c35d..000000000 --- a/foundry/models/marketplace_query_mapping_not_found_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MarketplaceQueryMappingNotFoundParameters(BaseModel): - """ - MarketplaceQueryMappingNotFoundParameters - """ # noqa: E501 - - artifact_repository: StrictStr = Field(alias="artifactRepository") - package_name: StrictStr = Field(alias="packageName") - query_type: StrictStr = Field( - description="The name of the Query in the API. ", alias="queryType" - ) - __properties: ClassVar[Set[str]] = set(("artifactRepository", "packageName", "queryType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MarketplaceQueryMappingNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/missing_parameter.py b/foundry/models/missing_parameter.py deleted file mode 100644 index 0ce1a8997..000000000 --- a/foundry/models/missing_parameter.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.missing_parameter_parameters import MissingParameterParameters -from typing_extensions import Self - - -class MissingParameter(BaseModel): - """ - Required parameters are missing. Please look at the `parameters` field to see which required parameters are missing from the request. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MissingParameterParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MissingParameter from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/missing_parameter_parameters.py b/foundry/models/missing_parameter_parameters.py deleted file mode 100644 index b52324bbe..000000000 --- a/foundry/models/missing_parameter_parameters.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from typing_extensions import Self - - -class MissingParameterParameters(BaseModel): - """ - MissingParameterParameters - """ # noqa: E501 - - parameters: Optional[List[StrictStr]] = None - __properties: ClassVar[Set[str]] = set(("parameters")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MissingParameterParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/missing_post_body.py b/foundry/models/missing_post_body.py deleted file mode 100644 index f6ea6020e..000000000 --- a/foundry/models/missing_post_body.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class MissingPostBody(BaseModel): - """ - A post body is required for this endpoint, but was not found in the request. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MissingPostBody from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/model_api_data_type.py b/foundry/models/model_api_data_type.py index ee9e829a4..b2fa653d6 100644 --- a/foundry/models/model_api_data_type.py +++ b/foundry/models/model_api_data_type.py @@ -38,18 +38,21 @@ from foundry.models.model_api_type import ModelApiType from typing_extensions import Self - class ModelApiDataType(BaseModel): """ - An object definition representing an input or an output type for the deployment API. - """ # noqa: E501 - + An object definition representing an input or an output type for the deployment API. + """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The name of a field. ") property_type: Optional[ModelApiType] = Field(default=None, alias="propertyType") required: Optional[StrictBool] = None __properties: ClassVar[Set[str]] = set(("name", "propertyType", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of property_type if self.property_type: - _dict["propertyType"] = self.property_type.to_dict() + _dict['propertyType'] = self.property_type.to_dict() return _dict @classmethod @@ -94,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/model_api_type.py b/foundry/models/model_api_type.py index 9a25740ed..6adf3b44d 100644 --- a/foundry/models/model_api_type.py +++ b/foundry/models/model_api_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -56,13 +55,17 @@ class ModelApiUnionType(BaseModel): """ ModelApiUnionType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["union"] union_types: Optional[List[ModelApiType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,7 +93,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -99,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict["unionTypes"] = _items + _dict['unionTypes'] = _items return _dict @classmethod @@ -111,29 +115,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiUnionType.model_rebuild(raise_errors=False) - class ModelApiStructField(BaseModel): """ ModelApiStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: ModelApiType = Field(alias="fieldType") name: StrictStr __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -161,12 +167,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -178,29 +185,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiStructField.model_rebuild(raise_errors=False) - class ModelApiStructType(BaseModel): """ ModelApiStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[ModelApiStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -228,7 +237,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -237,7 +247,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -249,30 +259,32 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiStructType.model_rebuild(raise_errors=False) - class ModelApiMapType(BaseModel): """ ModelApiMapType - """ # noqa: E501 - + """ # noqa: E501 key_type: ModelApiType = Field(alias="keyType") type: Literal["map"] value_type: ModelApiType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -300,15 +312,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -320,29 +333,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiMapType.model_rebuild(raise_errors=False) - class ModelApiArrayType(BaseModel): """ ModelApiArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ModelApiType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -370,12 +385,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -387,15 +403,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors ModelApiArrayType.model_rebuild(raise_errors=False) @@ -403,23 +418,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by models. """ -ModelApiType = Annotated[ - Union[ - AnyType, - BooleanType, - DateType, - FloatType, - IntegerType, - ModelApiArrayType, - ModelApiMapType, - ModelApiStructType, - ModelApiUnionType, - NullType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +ModelApiType = Annotated[Union[AnyType, BooleanType, DateType, FloatType, IntegerType, ModelApiArrayType, ModelApiMapType, ModelApiStructType, ModelApiUnionType, NullType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/model_property.py b/foundry/models/model_property.py index e2c5ba4c6..1d773bf2e 100644 --- a/foundry/models/model_property.py +++ b/foundry/models/model_property.py @@ -37,23 +37,21 @@ from pydantic import Field from typing_extensions import Self - class ModelProperty(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - - base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="baseType", - ) + """ # noqa: E501 + base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") __properties: ClassVar[Set[str]] = set(("baseType", "description", "displayName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/modify_object_rule.py b/foundry/models/modify_object_rule.py index ad80aae8d..9f3331ff3 100644 --- a/foundry/models/modify_object_rule.py +++ b/foundry/models/modify_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self - class ModifyObjectRule(BaseModel): """ ModifyObjectRule - """ # noqa: E501 - - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["modifyObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -92,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_line_string.py b/foundry/models/multi_line_string.py index 0984b4d8d..2fbd194d9 100644 --- a/foundry/models/multi_line_string.py +++ b/foundry/models/multi_line_string.py @@ -38,32 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiLineString(BaseModel): """ MultiLineString - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=2), - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]]] = None type: Literal["MultiLineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_point.py b/foundry/models/multi_point.py index ab905a5ed..31277bba6 100644 --- a/foundry/models/multi_point.py +++ b/foundry/models/multi_point.py @@ -38,23 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiPoint(BaseModel): """ MultiPoint - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]]] = None type: Literal["MultiPoint"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multi_polygon.py b/foundry/models/multi_polygon.py index e5afbf19e..b336bb887 100644 --- a/foundry/models/multi_polygon.py +++ b/foundry/models/multi_polygon.py @@ -38,34 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class MultiPolygon(BaseModel): """ MultiPolygon - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=4), - ] - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]]] = None type: Literal["MultiPolygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -93,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -107,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/multiple_group_by_on_field_not_supported.py b/foundry/models/multiple_group_by_on_field_not_supported.py deleted file mode 100644 index 0745693a4..000000000 --- a/foundry/models/multiple_group_by_on_field_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.multiple_group_by_on_field_not_supported_parameters import ( - MultipleGroupByOnFieldNotSupportedParameters, -) -from typing_extensions import Self - - -class MultipleGroupByOnFieldNotSupported(BaseModel): - """ - Aggregation cannot group by on the same field multiple times. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MultipleGroupByOnFieldNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MultipleGroupByOnFieldNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py b/foundry/models/multiple_group_by_on_field_not_supported_parameters.py deleted file mode 100644 index 107f20aff..000000000 --- a/foundry/models/multiple_group_by_on_field_not_supported_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MultipleGroupByOnFieldNotSupportedParameters(BaseModel): - """ - MultipleGroupByOnFieldNotSupportedParameters - """ # noqa: E501 - - duplicate_fields: Optional[List[StrictStr]] = Field(default=None, alias="duplicateFields") - __properties: ClassVar[Set[str]] = set(("duplicateFields")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MultipleGroupByOnFieldNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/multiple_property_values_not_supported.py b/foundry/models/multiple_property_values_not_supported.py deleted file mode 100644 index 6cd186ffd..000000000 --- a/foundry/models/multiple_property_values_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.multiple_property_values_not_supported_parameters import ( - MultiplePropertyValuesNotSupportedParameters, -) -from typing_extensions import Self - - -class MultiplePropertyValuesNotSupported(BaseModel): - """ - One of the requested property filters does not support multiple values. Please include only a single value for it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: MultiplePropertyValuesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MultiplePropertyValuesNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/multiple_property_values_not_supported_parameters.py b/foundry/models/multiple_property_values_not_supported_parameters.py deleted file mode 100644 index aef463428..000000000 --- a/foundry/models/multiple_property_values_not_supported_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class MultiplePropertyValuesNotSupportedParameters(BaseModel): - """ - MultiplePropertyValuesNotSupportedParameters - """ # noqa: E501 - - var_property: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="property", - ) - property_filter: StrictStr = Field( - description='Represents a filter used on properties. Endpoints that accept this supports optional parameters that have the form: `properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}` to filter the returned objects. For instance, you may use `properties.firstName.eq=John` to find objects that contain a property called "firstName" that has the exact value of "John". The following are a list of supported property filters: - `properties.{propertyApiName}.contains` - supported on arrays and can be used to filter array properties that have at least one of the provided values. If multiple query parameters are provided, then objects that have any of the given values for the specified property will be matched. - `properties.{propertyApiName}.eq` - used to filter objects that have the exact value for the provided property. If multiple query parameters are provided, then objects that have any of the given values will be matched. For instance, if the user provides a request by doing `?properties.firstName.eq=John&properties.firstName.eq=Anna`, then objects that have a firstName property of either John or Anna will be matched. This filter is supported on all property types except Arrays. - `properties.{propertyApiName}.neq` - used to filter objects that do not have the provided property values. Similar to the `eq` filter, if multiple values are provided, then objects that have any of the given values will be excluded from the result. - `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`, `properties.{propertyApiName}.gt` `properties.{propertyApiName}.gte` - represent less than, less than or equal to, greater than, and greater than or equal to respectively. These are supported on date, timestamp, byte, integer, long, double, decimal. - `properties.{propertyApiName}.isNull` - used to filter objects where the provided property is (or is not) null. This filter is supported on all property types. ', - alias="propertyFilter", - ) - __properties: ClassVar[Set[str]] = set(("property", "propertyFilter")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of MultiplePropertyValuesNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/null_type.py b/foundry/models/null_type.py index 4ce134496..c7c4a45f0 100644 --- a/foundry/models/null_type.py +++ b/foundry/models/null_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class NullType(BaseModel): """ NullType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["null"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_already_exists.py b/foundry/models/object_already_exists.py deleted file mode 100644 index 284ca285a..000000000 --- a/foundry/models/object_already_exists.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ObjectAlreadyExists(BaseModel): - """ - The object the user is attempting to create already exists. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_changed.py b/foundry/models/object_changed.py deleted file mode 100644 index 360aabdfc..000000000 --- a/foundry/models/object_changed.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ObjectChanged(BaseModel): - """ - An object used by this `Action` was changed by someone else while the `Action` was running. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectChanged from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_not_found.py b/foundry/models/object_not_found.py deleted file mode 100644 index f8111d35b..000000000 --- a/foundry/models/object_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.object_not_found_parameters import ObjectNotFoundParameters -from typing_extensions import Self - - -class ObjectNotFound(BaseModel): - """ - The requested object is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_not_found_parameters.py b/foundry/models/object_not_found_parameters.py deleted file mode 100644 index bd1afee52..000000000 --- a/foundry/models/object_not_found_parameters.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ObjectNotFoundParameters(BaseModel): - """ - ObjectNotFoundParameters - """ # noqa: E501 - - object_type: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") - __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_property_type.py b/foundry/models/object_property_type.py index 7313f363b..43d142b5b 100644 --- a/foundry/models/object_property_type.py +++ b/foundry/models/object_property_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -63,13 +62,17 @@ class OntologyObjectArrayType(BaseModel): """ OntologyObjectArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: ObjectPropertyType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -97,12 +100,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -114,15 +118,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyObjectArrayType.model_rebuild(raise_errors=False) @@ -130,27 +133,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Object properties. """ -ObjectPropertyType = Annotated[ - Union[ - AttachmentType, - BooleanType, - ByteType, - DateType, - DecimalType, - DoubleType, - FloatType, - GeoPointType, - GeoShapeType, - IntegerType, - LongType, - OntologyObjectArrayType, - ShortType, - StringType, - TimeseriesType, - TimestampType, - ], - Field(discriminator="type"), -] +ObjectPropertyType = Annotated[Union[AttachmentType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, GeoPointType, GeoShapeType, IntegerType, LongType, OntologyObjectArrayType, ShortType, StringType, TimeseriesType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/object_type.py b/foundry/models/object_type.py index f406f6a13..be77397c3 100644 --- a/foundry/models/object_type.py +++ b/foundry/models/object_type.py @@ -40,49 +40,26 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ObjectType(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) - description: Optional[StrictStr] = Field( - default=None, description="The description of the object type." - ) - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) - primary_key: Optional[List[StrictStr]] = Field( - default=None, - description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", - alias="primaryKey", - ) - properties: Optional[Dict[str, ModelProperty]] = Field( - default=None, description="A map of the properties of the object type." - ) - rid: StrictStr = Field( - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") + description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + primary_key: Optional[List[StrictStr]] = Field(default=None, description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", alias="primaryKey") + properties: Optional[Dict[str, ModelProperty]] = Field(default=None, description="A map of the properties of the object type.") + rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "description", - "displayName", - "primaryKey", - "properties", - "rid", - "status", - "visibility", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -110,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -119,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict["properties"] = _field_dict + _dict['properties'] = _field_dict return _dict @classmethod @@ -131,10 +109,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_not_found.py b/foundry/models/object_type_not_found.py deleted file mode 100644 index 1aea30d14..000000000 --- a/foundry/models/object_type_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.object_type_not_found_parameters import ObjectTypeNotFoundParameters -from typing_extensions import Self - - -class ObjectTypeNotFound(BaseModel): - """ - The requested object type is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ObjectTypeNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectTypeNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_type_not_found_parameters.py b/foundry/models/object_type_not_found_parameters.py deleted file mode 100644 index d7544a146..000000000 --- a/foundry/models/object_type_not_found_parameters.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ObjectTypeNotFoundParameters(BaseModel): - """ - ObjectTypeNotFoundParameters - """ # noqa: E501 - - object_type: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - object_type_rid: Optional[StrictStr] = Field( - default=None, - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.", - alias="objectTypeRid", - ) - __properties: ClassVar[Set[str]] = set(("objectType", "objectTypeRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectTypeNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_type_not_synced.py b/foundry/models/object_type_not_synced.py deleted file mode 100644 index 27c5715c0..000000000 --- a/foundry/models/object_type_not_synced.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters -from typing_extensions import Self - - -class ObjectTypeNotSynced(BaseModel): - """ - The requested object types are not synced into the ontology. Please reach out to your Ontology Administrator to re-index the object type in Ontology Management Application. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectTypeNotSynced from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_type_not_synced_parameters.py b/foundry/models/object_type_not_synced_parameters.py deleted file mode 100644 index 55e1510dd..000000000 --- a/foundry/models/object_type_not_synced_parameters.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ObjectTypeNotSyncedParameters(BaseModel): - """ - ObjectTypeNotSyncedParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - __properties: ClassVar[Set[str]] = set(("objectType")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectTypeNotSyncedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/object_type_v2.py b/foundry/models/object_type_v2.py index 73960523d..6d35c1be4 100644 --- a/foundry/models/object_type_v2.py +++ b/foundry/models/object_type_v2.py @@ -40,48 +40,26 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self - class ObjectTypeV2(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - - api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="apiName", - ) - description: Optional[StrictStr] = Field( - default=None, description="The description of the object type." - ) - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) - primary_key: StrictStr = Field( - description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", - alias="primaryKey", - ) - properties: Optional[Dict[str, PropertyV2]] = Field( - default=None, description="A map of the properties of the object type." - ) - rid: StrictStr = Field( - description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." - ) + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") + description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + primary_key: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="primaryKey") + properties: Optional[Dict[str, PropertyV2]] = Field(default=None, description="A map of the properties of the object type.") + rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set( - ( - "apiName", - "description", - "displayName", - "primaryKey", - "properties", - "rid", - "status", - "visibility", - ) - ) + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -109,7 +87,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -118,7 +97,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict["properties"] = _field_dict + _dict['properties'] = _field_dict return _dict @classmethod @@ -130,10 +109,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/object_type_visibility.py b/foundry/models/object_type_visibility.py index 02ba36e24..ca48c1875 100644 --- a/foundry/models/object_type_visibility.py +++ b/foundry/models/object_type_visibility.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,11 +48,13 @@ class ObjectTypeVisibility(str, Enum): """ allowed enum values """ - NORMAL = "NORMAL" - PROMINENT = "PROMINENT" - HIDDEN = "HIDDEN" + NORMAL = 'NORMAL' + PROMINENT = 'PROMINENT' + HIDDEN = 'HIDDEN' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ObjectTypeVisibility from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/object_type_with_link.py b/foundry/models/object_type_with_link.py index 7af2a30dc..79d6e8134 100644 --- a/foundry/models/object_type_with_link.py +++ b/foundry/models/object_type_with_link.py @@ -39,17 +39,20 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self - class ObjectTypeWithLink(BaseModel): """ ObjectTypeWithLink - """ # noqa: E501 - + """ # noqa: E501 link_types: Optional[List[LinkTypeSideV2]] = Field(default=None, alias="linkTypes") object_type: ObjectTypeV2 = Field(alias="objectType") __properties: ClassVar[Set[str]] = set(("linkTypes", "objectType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in link_types (list) @@ -86,10 +90,10 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.link_types: if _item: _items.append(_item.to_dict()) - _dict["linkTypes"] = _items + _dict['linkTypes'] = _items # override the default output from pydantic by calling `to_dict()` of object_type if self.object_type: - _dict["objectType"] = self.object_type.to_dict() + _dict['objectType'] = self.object_type.to_dict() return _dict @classmethod @@ -101,10 +105,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/objects_exceeded_limit.py b/foundry/models/objects_exceeded_limit.py deleted file mode 100644 index fd7e0c47a..000000000 --- a/foundry/models/objects_exceeded_limit.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ObjectsExceededLimit(BaseModel): - """ - There are more objects, but they cannot be returned by this API. Only 10,000 objects are available through this API for a given request. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ObjectsExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology.py b/foundry/models/ontology.py index 1715c3703..2a827d4d7 100644 --- a/foundry/models/ontology.py +++ b/foundry/models/ontology.py @@ -37,23 +37,22 @@ from pydantic import Field from typing_extensions import Self - class Ontology(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - rid: StrictStr = Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_data_type.py b/foundry/models/ontology_data_type.py index cf174a385..93c81fbf4 100644 --- a/foundry/models/ontology_data_type.py +++ b/foundry/models/ontology_data_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -64,14 +63,18 @@ class OntologyStructField(BaseModel): """ OntologyStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: OntologyDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") required: StrictBool __properties: ClassVar[Set[str]] = set(("fieldType", "name", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -99,12 +102,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -116,29 +120,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyStructField.model_rebuild(raise_errors=False) - class OntologyStructType(BaseModel): """ OntologyStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[OntologyStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -166,7 +172,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -175,7 +182,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -187,29 +194,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyStructType.model_rebuild(raise_errors=False) - class OntologySetType(BaseModel): """ OntologySetType - """ # noqa: E501 - + """ # noqa: E501 item_type: OntologyDataType = Field(alias="itemType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -237,12 +246,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -254,30 +264,32 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologySetType.model_rebuild(raise_errors=False) - class OntologyMapType(BaseModel): """ OntologyMapType - """ # noqa: E501 - + """ # noqa: E501 key_type: OntologyDataType = Field(alias="keyType") type: Literal["map"] value_type: OntologyDataType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -305,15 +317,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -325,29 +338,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyMapType.model_rebuild(raise_errors=False) - class OntologyArrayType(BaseModel): """ OntologyArrayType - """ # noqa: E501 - + """ # noqa: E501 item_type: OntologyDataType = Field(alias="itemType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -375,12 +390,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -392,15 +408,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors OntologyArrayType.model_rebuild(raise_errors=False) @@ -408,31 +423,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the primitive types used by Palantir's Ontology-based products. """ -OntologyDataType = Annotated[ - Union[ - AnyType, - BinaryType, - BooleanType, - ByteType, - DateType, - DecimalType, - DoubleType, - FloatType, - IntegerType, - LongType, - OntologyArrayType, - OntologyMapType, - OntologyObjectSetType, - OntologyObjectType, - OntologySetType, - OntologyStructType, - ShortType, - StringType, - TimestampType, - UnsupportedType, - ], - Field(discriminator="type"), -] +OntologyDataType = Annotated[Union[AnyType, BinaryType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, IntegerType, LongType, OntologyArrayType, OntologyMapType, OntologyObjectSetType, OntologyObjectType, OntologySetType, OntologyStructType, ShortType, StringType, TimestampType, UnsupportedType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/ontology_edits_exceeded_limit.py b/foundry/models/ontology_edits_exceeded_limit.py deleted file mode 100644 index 64f6fcc34..000000000 --- a/foundry/models/ontology_edits_exceeded_limit.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.ontology_edits_exceeded_limit_parameters import ( - OntologyEditsExceededLimitParameters, -) -from typing_extensions import Self - - -class OntologyEditsExceededLimit(BaseModel): - """ - The number of edits to the Ontology exceeded the allowed limit. This may happen because of the request or because the Action is modifying too many objects. Please change the size of your request or contact the Ontology administrator. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: OntologyEditsExceededLimitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OntologyEditsExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology_edits_exceeded_limit_parameters.py b/foundry/models/ontology_edits_exceeded_limit_parameters.py deleted file mode 100644 index 5f47ef472..000000000 --- a/foundry/models/ontology_edits_exceeded_limit_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictInt -from pydantic import Field -from typing_extensions import Self - - -class OntologyEditsExceededLimitParameters(BaseModel): - """ - OntologyEditsExceededLimitParameters - """ # noqa: E501 - - edits_count: StrictInt = Field(alias="editsCount") - edits_limit: StrictInt = Field(alias="editsLimit") - __properties: ClassVar[Set[str]] = set(("editsCount", "editsLimit")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OntologyEditsExceededLimitParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology_full_metadata.py b/foundry/models/ontology_full_metadata.py index 43cd31d51..887cb889e 100644 --- a/foundry/models/ontology_full_metadata.py +++ b/foundry/models/ontology_full_metadata.py @@ -41,19 +41,22 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self - class OntologyFullMetadata(BaseModel): """ OntologyFullMetadata - """ # noqa: E501 - + """ # noqa: E501 action_types: Optional[Dict[str, ActionTypeV2]] = Field(default=None, alias="actionTypes") object_types: Optional[Dict[str, ObjectTypeWithLink]] = Field(default=None, alias="objectTypes") ontology: OntologyV2 query_types: Optional[Dict[str, QueryTypeV2]] = Field(default=None, alias="queryTypes") __properties: ClassVar[Set[str]] = set(("actionTypes", "objectTypes", "ontology", "queryTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +84,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in action_types (dict) @@ -90,24 +94,24 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.action_types: if self.action_types[_key]: _field_dict[_key] = self.action_types[_key].to_dict() - _dict["actionTypes"] = _field_dict + _dict['actionTypes'] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in object_types (dict) _field_dict = {} if self.object_types: for _key in self.object_types: if self.object_types[_key]: _field_dict[_key] = self.object_types[_key].to_dict() - _dict["objectTypes"] = _field_dict + _dict['objectTypes'] = _field_dict # override the default output from pydantic by calling `to_dict()` of ontology if self.ontology: - _dict["ontology"] = self.ontology.to_dict() + _dict['ontology'] = self.ontology.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in query_types (dict) _field_dict = {} if self.query_types: for _key in self.query_types: if self.query_types[_key]: _field_dict[_key] = self.query_types[_key].to_dict() - _dict["queryTypes"] = _field_dict + _dict['queryTypes'] = _field_dict return _dict @classmethod @@ -119,10 +123,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_not_found.py b/foundry/models/ontology_not_found.py deleted file mode 100644 index 7c23356b2..000000000 --- a/foundry/models/ontology_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.ontology_not_found_parameters import OntologyNotFoundParameters -from typing_extensions import Self - - -class OntologyNotFound(BaseModel): - """ - The requested Ontology is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: OntologyNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OntologyNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology_not_found_parameters.py b/foundry/models/ontology_not_found_parameters.py deleted file mode 100644 index 0fa763407..000000000 --- a/foundry/models/ontology_not_found_parameters.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class OntologyNotFoundParameters(BaseModel): - """ - OntologyNotFoundParameters - """ # noqa: E501 - - api_name: Optional[StrictStr] = Field(default=None, alias="apiName") - ontology_rid: Optional[StrictStr] = Field( - default=None, - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ", - alias="ontologyRid", - ) - __properties: ClassVar[Set[str]] = set(("apiName", "ontologyRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OntologyNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology_object_set_type.py b/foundry/models/ontology_object_set_type.py index c36bbd127..a81bbc7b1 100644 --- a/foundry/models/ontology_object_set_type.py +++ b/foundry/models/ontology_object_set_type.py @@ -37,26 +37,21 @@ from pydantic import Field from typing_extensions import Self - class OntologyObjectSetType(BaseModel): """ OntologyObjectSetType - """ # noqa: E501 - - object_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectApiName", - ) - object_type_api_name: Optional[StrictStr] = Field( - default=None, - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") + object_type_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["objectSet"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -98,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_object_type.py b/foundry/models/ontology_object_type.py index 8ab4a458f..95d259811 100644 --- a/foundry/models/ontology_object_type.py +++ b/foundry/models/ontology_object_type.py @@ -37,24 +37,21 @@ from pydantic import Field from typing_extensions import Self - class OntologyObjectType(BaseModel): """ OntologyObjectType - """ # noqa: E501 - - object_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectApiName", - ) - object_type_api_name: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectTypeApiName", - ) + """ # noqa: E501 + object_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") + object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") type: Literal["object"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -82,7 +79,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -96,10 +94,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/ontology_syncing.py b/foundry/models/ontology_syncing.py deleted file mode 100644 index d27bb050b..000000000 --- a/foundry/models/ontology_syncing.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters -from typing_extensions import Self - - -class OntologySyncing(BaseModel): - """ - The requested object type has been changed in the **Ontology Manager** and changes are currently being applied. Wait a few seconds and try again. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OntologySyncing from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/ontology_v2.py b/foundry/models/ontology_v2.py index bf5a79da4..9b9968ef9 100644 --- a/foundry/models/ontology_v2.py +++ b/foundry/models/ontology_v2.py @@ -37,23 +37,22 @@ from pydantic import Field from typing_extensions import Self - class OntologyV2(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field( - description="The display name of the entity.", alias="displayName" - ) - rid: StrictStr = Field( - description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " - ) + display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") + rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -95,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/open_transaction_already_exists.py b/foundry/models/open_transaction_already_exists.py deleted file mode 100644 index 633f04ef0..000000000 --- a/foundry/models/open_transaction_already_exists.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class OpenTransactionAlreadyExists(BaseModel): - """ - A transaction is already open on this dataset and branch. A branch of a dataset can only have one open transaction at a time. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OpenTransactionAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/operation_not_found.py b/foundry/models/operation_not_found.py deleted file mode 100644 index 811451b0f..000000000 --- a/foundry/models/operation_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.operation_not_found_parameters import OperationNotFoundParameters -from typing_extensions import Self - - -class OperationNotFound(BaseModel): - """ - The operation is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: OperationNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OperationNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/operation_not_found_parameters.py b/foundry/models/operation_not_found_parameters.py deleted file mode 100644 index a0b8ff9d8..000000000 --- a/foundry/models/operation_not_found_parameters.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from typing_extensions import Self - - -class OperationNotFoundParameters(BaseModel): - """ - OperationNotFoundParameters - """ # noqa: E501 - - id: StrictStr - __properties: ClassVar[Set[str]] = set(("id")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of OperationNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter.py b/foundry/models/parameter.py index d5065065c..9613dfeb9 100644 --- a/foundry/models/parameter.py +++ b/foundry/models/parameter.py @@ -38,22 +38,22 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self - class Parameter(BaseModel): """ Details about a parameter of an action or query. - """ # noqa: E501 - - base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="baseType", - ) + """ # noqa: E501 + base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") data_type: Optional[OntologyDataType] = Field(default=None, alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("baseType", "dataType", "description", "required")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,12 +81,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -98,10 +99,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/parameter_object_not_found.py b/foundry/models/parameter_object_not_found.py deleted file mode 100644 index a4e168414..000000000 --- a/foundry/models/parameter_object_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.parameter_object_not_found_parameters import ParameterObjectNotFoundParameters -from typing_extensions import Self - - -class ParameterObjectNotFound(BaseModel): - """ - The parameter object reference or parameter default value is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ParameterObjectNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterObjectNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter_object_not_found_parameters.py b/foundry/models/parameter_object_not_found_parameters.py deleted file mode 100644 index 69a374474..000000000 --- a/foundry/models/parameter_object_not_found_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ParameterObjectNotFoundParameters(BaseModel): - """ - ParameterObjectNotFoundParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - primary_key: Optional[Dict[str, Any]] = Field(default=None, alias="primaryKey") - __properties: ClassVar[Set[str]] = set(("objectType", "primaryKey")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterObjectNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter_object_set_rid_not_found.py b/foundry/models/parameter_object_set_rid_not_found.py deleted file mode 100644 index 40bea893e..000000000 --- a/foundry/models/parameter_object_set_rid_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.parameter_object_set_rid_not_found_parameters import ( - ParameterObjectSetRidNotFoundParameters, -) -from typing_extensions import Self - - -class ParameterObjectSetRidNotFound(BaseModel): - """ - The parameter object set RID is not found, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ParameterObjectSetRidNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterObjectSetRidNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter_object_set_rid_not_found_parameters.py b/foundry/models/parameter_object_set_rid_not_found_parameters.py deleted file mode 100644 index 20037296c..000000000 --- a/foundry/models/parameter_object_set_rid_not_found_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ParameterObjectSetRidNotFoundParameters(BaseModel): - """ - ParameterObjectSetRidNotFoundParameters - """ # noqa: E501 - - object_set_rid: StrictStr = Field(alias="objectSetRid") - __properties: ClassVar[Set[str]] = set(("objectSetRid")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterObjectSetRidNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter_type_not_supported.py b/foundry/models/parameter_type_not_supported.py deleted file mode 100644 index d8f33ac03..000000000 --- a/foundry/models/parameter_type_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.parameter_type_not_supported_parameters import ( - ParameterTypeNotSupportedParameters, -) -from typing_extensions import Self - - -class ParameterTypeNotSupported(BaseModel): - """ - The type of the requested parameter is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ParameterTypeNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterTypeNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameter_type_not_supported_parameters.py b/foundry/models/parameter_type_not_supported_parameters.py deleted file mode 100644 index d76a3ad96..000000000 --- a/foundry/models/parameter_type_not_supported_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ParameterTypeNotSupportedParameters(BaseModel): - """ - ParameterTypeNotSupportedParameters - """ # noqa: E501 - - parameter_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="parameterBaseType", - ) - parameter_id: StrictStr = Field( - description="The unique identifier of the parameter. Parameters are used as inputs when an action or query is applied. Parameters can be viewed and managed in the **Ontology Manager**. ", - alias="parameterId", - ) - __properties: ClassVar[Set[str]] = set(("parameterBaseType", "parameterId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParameterTypeNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameters_not_found.py b/foundry/models/parameters_not_found.py deleted file mode 100644 index 8517ae79c..000000000 --- a/foundry/models/parameters_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.parameters_not_found_parameters import ParametersNotFoundParameters -from typing_extensions import Self - - -class ParametersNotFound(BaseModel): - """ - The provided parameter ID was not found for the action. Please look at the `configuredParameterIds` field to see which ones are available. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ParametersNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParametersNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parameters_not_found_parameters.py b/foundry/models/parameters_not_found_parameters.py deleted file mode 100644 index 88e78737f..000000000 --- a/foundry/models/parameters_not_found_parameters.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ParametersNotFoundParameters(BaseModel): - """ - ParametersNotFoundParameters - """ # noqa: E501 - - action_type: StrictStr = Field( - description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", - alias="actionType", - ) - configured_parameter_ids: Optional[List[StrictStr]] = Field( - default=None, alias="configuredParameterIds" - ) - unknown_parameter_ids: Optional[List[StrictStr]] = Field( - default=None, alias="unknownParameterIds" - ) - __properties: ClassVar[Set[str]] = set( - ("actionType", "configuredParameterIds", "unknownParameterIds") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParametersNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/parent_attachment_permission_denied.py b/foundry/models/parent_attachment_permission_denied.py deleted file mode 100644 index 2a472da85..000000000 --- a/foundry/models/parent_attachment_permission_denied.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class ParentAttachmentPermissionDenied(BaseModel): - """ - The user does not have permission to parent attachments. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ParentAttachmentPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/polygon.py b/foundry/models/polygon.py index 9b58afccb..933f4cb68 100644 --- a/foundry/models/polygon.py +++ b/foundry/models/polygon.py @@ -38,32 +38,21 @@ from typing_extensions import Annotated from typing_extensions import Self - class Polygon(BaseModel): """ Polygon - """ # noqa: E501 - - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( - default=None, - description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', - ) - coordinates: Optional[ - List[ - Annotated[ - List[ - Annotated[ - List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) - ] - ], - Field(min_length=4), - ] - ] - ] = None + """ # noqa: E501 + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]] = None type: Literal["Polygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +80,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +95,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/properties_not_filterable.py b/foundry/models/properties_not_filterable.py deleted file mode 100644 index 7f9ee8560..000000000 --- a/foundry/models/properties_not_filterable.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters -from typing_extensions import Self - - -class PropertiesNotFilterable(BaseModel): - """ - Results could not be filtered by the requested properties. Please mark the properties as *Searchable* and *Selectable* in the **Ontology Manager** to be able to filter on those properties. There may be a short delay between the time a property is marked *Searchable* and *Selectable* and when it can be used. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotFilterable from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/properties_not_found.py b/foundry/models/properties_not_found.py deleted file mode 100644 index dcac52b9d..000000000 --- a/foundry/models/properties_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.properties_not_found_parameters import PropertiesNotFoundParameters -from typing_extensions import Self - - -class PropertiesNotFound(BaseModel): - """ - The requested properties are not found on the object type. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: PropertiesNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/properties_not_found_parameters.py b/foundry/models/properties_not_found_parameters.py deleted file mode 100644 index 94e03e21a..000000000 --- a/foundry/models/properties_not_found_parameters.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class PropertiesNotFoundParameters(BaseModel): - """ - PropertiesNotFoundParameters - """ # noqa: E501 - - object_type: StrictStr = Field( - description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", - alias="objectType", - ) - properties: Optional[List[StrictStr]] = None - __properties: ClassVar[Set[str]] = set(("objectType", "properties")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/properties_not_searchable.py b/foundry/models/properties_not_searchable.py deleted file mode 100644 index 12cdb2835..000000000 --- a/foundry/models/properties_not_searchable.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.properties_not_searchable_parameters import PropertiesNotSearchableParameters -from typing_extensions import Self - - -class PropertiesNotSearchable(BaseModel): - """ - Search is not enabled on the specified properties. Please mark the properties as *Searchable* in the **Ontology Manager** to enable search on them. There may be a short delay between the time a property is marked *Searchable* and when it can be used. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: PropertiesNotSearchableParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotSearchable from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/properties_not_searchable_parameters.py b/foundry/models/properties_not_searchable_parameters.py deleted file mode 100644 index edf8e3c87..000000000 --- a/foundry/models/properties_not_searchable_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class PropertiesNotSearchableParameters(BaseModel): - """ - PropertiesNotSearchableParameters - """ # noqa: E501 - - property_api_names: Optional[List[StrictStr]] = Field(default=None, alias="propertyApiNames") - __properties: ClassVar[Set[str]] = set(("propertyApiNames")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotSearchableParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/properties_not_sortable.py b/foundry/models/properties_not_sortable.py deleted file mode 100644 index bf3d2e95f..000000000 --- a/foundry/models/properties_not_sortable.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.duplicate_order_by_parameters import DuplicateOrderByParameters -from typing_extensions import Self - - -class PropertiesNotSortable(BaseModel): - """ - Results could not be ordered by the requested properties. Please mark the properties as *Searchable* and *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. There may be a short delay between the time a property is set to *Searchable* and *Sortable* and when it can be used. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DuplicateOrderByParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertiesNotSortable from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_api_name_not_found.py b/foundry/models/property_api_name_not_found.py deleted file mode 100644 index f909e279d..000000000 --- a/foundry/models/property_api_name_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.property_api_name_not_found_parameters import PropertyApiNameNotFoundParameters -from typing_extensions import Self - - -class PropertyApiNameNotFound(BaseModel): - """ - A property that was required to have an API name, such as a primary key, is missing one. You can set an API name for it using the **Ontology Manager**. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: PropertyApiNameNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyApiNameNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_api_name_not_found_parameters.py b/foundry/models/property_api_name_not_found_parameters.py deleted file mode 100644 index 9f11163cc..000000000 --- a/foundry/models/property_api_name_not_found_parameters.py +++ /dev/null @@ -1,104 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class PropertyApiNameNotFoundParameters(BaseModel): - """ - PropertyApiNameNotFoundParameters - """ # noqa: E501 - - property_base_type: StrictStr = Field( - description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", - alias="propertyBaseType", - ) - property_id: StrictStr = Field( - description="The immutable ID of a property. Property IDs are only used to identify properties in the **Ontology Manager** application and assign them API names. In every other case, API names should be used instead of property IDs. ", - alias="propertyId", - ) - __properties: ClassVar[Set[str]] = set(("propertyBaseType", "propertyId")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyApiNameNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_base_type_not_supported.py b/foundry/models/property_base_type_not_supported.py deleted file mode 100644 index 59015c498..000000000 --- a/foundry/models/property_base_type_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_aggregation_range_property_type_parameters import ( - InvalidAggregationRangePropertyTypeParameters, -) -from typing_extensions import Self - - -class PropertyBaseTypeNotSupported(BaseModel): - """ - The type of the requested property is not currently supported by this API. If you need support for this, please reach out to Palantir Support. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidAggregationRangePropertyTypeParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyBaseTypeNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_filters_not_supported.py b/foundry/models/property_filters_not_supported.py deleted file mode 100644 index de23da27e..000000000 --- a/foundry/models/property_filters_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.invalid_property_filters_combination_parameters import ( - InvalidPropertyFiltersCombinationParameters, -) -from typing_extensions import Self - - -class PropertyFiltersNotSupported(BaseModel): - """ - At least one of the requested property filters are not supported. See the documentation of `PropertyFilter` for a list of supported property filters. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: InvalidPropertyFiltersCombinationParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyFiltersNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_types_search_not_supported.py b/foundry/models/property_types_search_not_supported.py deleted file mode 100644 index 7a56a7e68..000000000 --- a/foundry/models/property_types_search_not_supported.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.property_types_search_not_supported_parameters import ( - PropertyTypesSearchNotSupportedParameters, -) -from typing_extensions import Self - - -class PropertyTypesSearchNotSupported(BaseModel): - """ - The search on the property types are not supported. See the `Search Objects` documentation for a list of supported search queries on different property types. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: PropertyTypesSearchNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyTypesSearchNotSupported from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_types_search_not_supported_parameters.py b/foundry/models/property_types_search_not_supported_parameters.py deleted file mode 100644 index 23191aabc..000000000 --- a/foundry/models/property_types_search_not_supported_parameters.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from typing_extensions import Self - - -class PropertyTypesSearchNotSupportedParameters(BaseModel): - """ - PropertyTypesSearchNotSupportedParameters - """ # noqa: E501 - - parameters: Optional[Dict[str, List[StrictStr]]] = None - __properties: ClassVar[Set[str]] = set(("parameters")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PropertyTypesSearchNotSupportedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/property_v2.py b/foundry/models/property_v2.py index 5342f2ec6..2a518bf0f 100644 --- a/foundry/models/property_v2.py +++ b/foundry/models/property_v2.py @@ -38,20 +38,21 @@ from foundry.models.object_property_type import ObjectPropertyType from typing_extensions import Self - class PropertyV2(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - + """ # noqa: E501 data_type: ObjectPropertyType = Field(alias="dataType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") __properties: ClassVar[Set[str]] = set(("dataType", "description", "displayName")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,12 +80,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -96,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/put_schema_permission_denied.py b/foundry/models/put_schema_permission_denied.py deleted file mode 100644 index 9a0a9610e..000000000 --- a/foundry/models/put_schema_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.branch_already_exists_parameters import BranchAlreadyExistsParameters -from typing_extensions import Self - - -class PutSchemaPermissionDenied(BaseModel): - """ - todo - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: BranchAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of PutSchemaPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_aggregation_key_type.py b/foundry/models/query_aggregation_key_type.py index 03c0ac36c..03d8cff53 100644 --- a/foundry/models/query_aggregation_key_type.py +++ b/foundry/models/query_aggregation_key_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -49,21 +48,13 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation keys. """ -QueryAggregationKeyType = Annotated[ - Union[ - BooleanType, - DateType, - DoubleType, - IntegerType, - QueryAggregationRangeType, - StringType, - TimestampType, - ], - Field(discriminator="type"), -] +QueryAggregationKeyType = Annotated[Union[BooleanType, DateType, DoubleType, IntegerType, QueryAggregationRangeType, StringType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_aggregation_range_sub_type.py b/foundry/models/query_aggregation_range_sub_type.py index 63731e76d..16c0246ba 100644 --- a/foundry/models/query_aggregation_range_sub_type.py +++ b/foundry/models/query_aggregation_range_sub_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -46,17 +45,16 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation ranges. """ -QueryAggregationRangeSubType = Annotated[ - Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type") -] +QueryAggregationRangeSubType = Annotated[Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__( - QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType) -) +object.__setattr__(QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType)) diff --git a/foundry/models/query_aggregation_range_type.py b/foundry/models/query_aggregation_range_type.py index 2e5368370..1ae4bb2cb 100644 --- a/foundry/models/query_aggregation_range_type.py +++ b/foundry/models/query_aggregation_range_type.py @@ -38,17 +38,20 @@ from foundry.models.query_aggregation_range_sub_type import QueryAggregationRangeSubType from typing_extensions import Self - class QueryAggregationRangeType(BaseModel): """ QueryAggregationRangeType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryAggregationRangeSubType = Field(alias="subType") type: Literal["range"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_aggregation_value_type.py b/foundry/models/query_aggregation_value_type.py index c0b2cf5fa..a76310413 100644 --- a/foundry/models/query_aggregation_value_type.py +++ b/foundry/models/query_aggregation_value_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -45,17 +44,16 @@ from foundry.models.timestamp_type import TimestampType + """ A union of all the types supported by query aggregation keys. """ -QueryAggregationValueType = Annotated[ - Union[DateType, DoubleType, TimestampType], Field(discriminator="type") -] +QueryAggregationValueType = Annotated[Union[DateType, DoubleType, TimestampType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__( - QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType) -) +object.__setattr__(QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType)) diff --git a/foundry/models/query_data_type.py b/foundry/models/query_data_type.py index d1e4c442d..059e3a873 100644 --- a/foundry/models/query_data_type.py +++ b/foundry/models/query_data_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -63,13 +62,17 @@ class QueryUnionType(BaseModel): """ QueryUnionType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["union"] union_types: Optional[List[QueryDataType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -97,7 +100,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -106,7 +110,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict["unionTypes"] = _items + _dict['unionTypes'] = _items return _dict @classmethod @@ -118,29 +122,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryUnionType.model_rebuild(raise_errors=False) - class QueryStructField(BaseModel): """ QueryStructField - """ # noqa: E501 - + """ # noqa: E501 field_type: QueryDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -168,12 +174,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict["fieldType"] = self.field_type.to_dict() + _dict['fieldType'] = self.field_type.to_dict() return _dict @classmethod @@ -185,29 +192,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryStructField.model_rebuild(raise_errors=False) - class QueryStructType(BaseModel): """ QueryStructType - """ # noqa: E501 - + """ # noqa: E501 fields: Optional[List[QueryStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -235,7 +244,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -244,7 +254,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict["fields"] = _items + _dict['fields'] = _items return _dict @classmethod @@ -256,29 +266,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryStructType.model_rebuild(raise_errors=False) - class QuerySetType(BaseModel): """ QuerySetType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryDataType = Field(alias="subType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -306,12 +318,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -323,29 +336,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QuerySetType.model_rebuild(raise_errors=False) - class QueryArrayType(BaseModel): """ QueryArrayType - """ # noqa: E501 - + """ # noqa: E501 sub_type: QueryDataType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -373,12 +388,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict["subType"] = self.sub_type.to_dict() + _dict['subType'] = self.sub_type.to_dict() return _dict @classmethod @@ -390,15 +406,14 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - # TODO: Rewrite to not use raise_errors QueryArrayType.model_rebuild(raise_errors=False) @@ -406,30 +421,9 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Query parameters or outputs. """ -QueryDataType = Annotated[ - Union[ - AttachmentType, - BooleanType, - DateType, - DoubleType, - FloatType, - IntegerType, - LongType, - NullType, - OntologyObjectSetType, - OntologyObjectType, - QueryArrayType, - QuerySetType, - QueryStructType, - QueryUnionType, - StringType, - ThreeDimensionalAggregation, - TimestampType, - TwoDimensionalAggregation, - UnsupportedType, - ], - Field(discriminator="type"), -] +QueryDataType = Annotated[Union[AttachmentType, BooleanType, DateType, DoubleType, FloatType, IntegerType, LongType, NullType, OntologyObjectSetType, OntologyObjectType, QueryArrayType, QuerySetType, QueryStructType, QueryUnionType, StringType, ThreeDimensionalAggregation, TimestampType, TwoDimensionalAggregation, UnsupportedType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_encountered_user_facing_error.py b/foundry/models/query_encountered_user_facing_error.py deleted file mode 100644 index 2d76bdabc..000000000 --- a/foundry/models/query_encountered_user_facing_error.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_encountered_user_facing_error_parameters import ( - FunctionEncounteredUserFacingErrorParameters, -) -from typing_extensions import Self - - -class QueryEncounteredUserFacingError(BaseModel): - """ - The authored `Query` failed to execute because of a user induced error. The message argument is meant to be displayed to the user. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionEncounteredUserFacingErrorParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of QueryEncounteredUserFacingError from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_memory_exceeded_limit.py b/foundry/models/query_memory_exceeded_limit.py deleted file mode 100644 index bc7ad8566..000000000 --- a/foundry/models/query_memory_exceeded_limit.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from typing_extensions import Self - - -class QueryMemoryExceededLimit(BaseModel): - """ - Memory limits were exceeded for the `Query` execution. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("TIMEOUT"): - raise ValueError("must be one of enum values ('TIMEOUT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of QueryMemoryExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_not_found.py b/foundry/models/query_not_found.py deleted file mode 100644 index 9475af5cc..000000000 --- a/foundry/models/query_not_found.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.query_not_found_parameters import QueryNotFoundParameters -from typing_extensions import Self - - -class QueryNotFound(BaseModel): - """ - The query is not found, or the user does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: QueryNotFoundParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of QueryNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_not_found_parameters.py b/foundry/models/query_not_found_parameters.py deleted file mode 100644 index 667e32a8f..000000000 --- a/foundry/models/query_not_found_parameters.py +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class QueryNotFoundParameters(BaseModel): - """ - QueryNotFoundParameters - """ # noqa: E501 - - query: StrictStr = Field(description="The name of the Query in the API. ") - __properties: ClassVar[Set[str]] = set(("query")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of QueryNotFoundParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_parameter_v2.py b/foundry/models/query_parameter_v2.py index 36c71ac98..a9fd86e52 100644 --- a/foundry/models/query_parameter_v2.py +++ b/foundry/models/query_parameter_v2.py @@ -38,17 +38,20 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self - class QueryParameterV2(BaseModel): """ Details about a parameter of a query. - """ # noqa: E501 - + """ # noqa: E501 data_type: QueryDataType = Field(alias="dataType") description: Optional[StrictStr] = None __properties: ClassVar[Set[str]] = set(("dataType", "description")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict["dataType"] = self.data_type.to_dict() + _dict['dataType'] = self.data_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_time_exceeded_limit.py b/foundry/models/query_time_exceeded_limit.py deleted file mode 100644 index a7f0e42ad..000000000 --- a/foundry/models/query_time_exceeded_limit.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.function_execution_failed_parameters import FunctionExecutionFailedParameters -from typing_extensions import Self - - -class QueryTimeExceededLimit(BaseModel): - """ - Time limits were exceeded for the `Query` execution. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FunctionExecutionFailedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("TIMEOUT"): - raise ValueError("must be one of enum values ('TIMEOUT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of QueryTimeExceededLimit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/query_type.py b/foundry/models/query_type.py index c37e3f354..d4349dede 100644 --- a/foundry/models/query_type.py +++ b/foundry/models/query_type.py @@ -39,30 +39,25 @@ from foundry.models.parameter import Parameter from typing_extensions import Self - class QueryType(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") output: Optional[OntologyDataType] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " - ) - version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " - ) - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "output", "parameters", "rid", "version") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") + version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,19 +85,20 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict["output"] = self.output.to_dict() + _dict['output'] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -114,10 +110,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/query_type_v2.py b/foundry/models/query_type_v2.py index 02d8ef095..10e2ed1c0 100644 --- a/foundry/models/query_type_v2.py +++ b/foundry/models/query_type_v2.py @@ -39,30 +39,25 @@ from foundry.models.query_parameter_v2 import QueryParameterV2 from typing_extensions import Self - class QueryTypeV2(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 - + """ # noqa: E501 api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field( - default=None, description="The display name of the entity.", alias="displayName" - ) + display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") output: QueryDataType parameters: Optional[Dict[str, QueryParameterV2]] = None - rid: StrictStr = Field( - description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " - ) - version: StrictStr = Field( - description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " - ) - __properties: ClassVar[Set[str]] = set( - ("apiName", "description", "displayName", "output", "parameters", "rid", "version") - ) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") + version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") + __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -90,19 +85,20 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict["output"] = self.output.to_dict() + _dict['output'] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict["parameters"] = _field_dict + _dict['parameters'] = _field_dict return _dict @classmethod @@ -114,10 +110,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/read_table_permission_denied.py b/foundry/models/read_table_permission_denied.py deleted file mode 100644 index 1dcd3a70e..000000000 --- a/foundry/models/read_table_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.column_types_not_supported_parameters import ColumnTypesNotSupportedParameters -from typing_extensions import Self - - -class ReadTablePermissionDenied(BaseModel): - """ - The provided token does not have permission to read the given dataset as a table. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ColumnTypesNotSupportedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ReadTablePermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/release_status.py b/foundry/models/release_status.py index a1a993020..1df522dfb 100644 --- a/foundry/models/release_status.py +++ b/foundry/models/release_status.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -47,11 +48,13 @@ class ReleaseStatus(str, Enum): """ allowed enum values """ - ACTIVE = "ACTIVE" - EXPERIMENTAL = "EXPERIMENTAL" - DEPRECATED = "DEPRECATED" + ACTIVE = 'ACTIVE' + EXPERIMENTAL = 'EXPERIMENTAL' + DEPRECATED = 'DEPRECATED' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReleaseStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/resource_name_already_exists.py b/foundry/models/resource_name_already_exists.py deleted file mode 100644 index f2675eeb0..000000000 --- a/foundry/models/resource_name_already_exists.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.resource_name_already_exists_parameters import ( - ResourceNameAlreadyExistsParameters, -) -from typing_extensions import Self - - -class ResourceNameAlreadyExists(BaseModel): - """ - The provided resource name is already in use by another resource in the same folder. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ResourceNameAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("CONFLICT"): - raise ValueError("must be one of enum values ('CONFLICT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ResourceNameAlreadyExists from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/resource_name_already_exists_parameters.py b/foundry/models/resource_name_already_exists_parameters.py deleted file mode 100644 index 8ac8371d8..000000000 --- a/foundry/models/resource_name_already_exists_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class ResourceNameAlreadyExistsParameters(BaseModel): - """ - ResourceNameAlreadyExistsParameters - """ # noqa: E501 - - parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - resource_name: StrictStr = Field(alias="resourceName") - __properties: ClassVar[Set[str]] = set(("parentFolderRid", "resourceName")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ResourceNameAlreadyExistsParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/return_edits_mode.py b/foundry/models/return_edits_mode.py deleted file mode 100644 index 78d2adb57..000000000 --- a/foundry/models/return_edits_mode.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -import re # noqa: F401 -from enum import Enum - - -try: - from typing import Self -except ImportError: - from typing_extensions import Self - - -class ReturnEditsMode(str, Enum): - """ - ReturnEditsMode - """ - - """ - allowed enum values - """ - ALL = "ALL" - NONE = "NONE" - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of ReturnEditsMode from a JSON string""" - return cls(json.loads(json_str)) diff --git a/foundry/models/schema_not_found.py b/foundry/models/schema_not_found.py deleted file mode 100644 index 6b88749a3..000000000 --- a/foundry/models/schema_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.delete_schema_permission_denied_parameters import ( - DeleteSchemaPermissionDeniedParameters, -) -from typing_extensions import Self - - -class SchemaNotFound(BaseModel): - """ - A schema could not be found for the given dataset and branch, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: DeleteSchemaPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of SchemaNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/short_type.py b/foundry/models/short_type.py index a4b8f7d6e..22263bac3 100644 --- a/foundry/models/short_type.py +++ b/foundry/models/short_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class ShortType(BaseModel): """ ShortType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["short"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/string_type.py b/foundry/models/string_type.py index 4a53d17d2..97732ad2f 100644 --- a/foundry/models/string_type.py +++ b/foundry/models/string_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class StringType(BaseModel): """ StringType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["string"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/table_export_format.py b/foundry/models/table_export_format.py index 75e6f213d..f47ff578b 100644 --- a/foundry/models/table_export_format.py +++ b/foundry/models/table_export_format.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,16 +42,18 @@ class TableExportFormat(str, Enum): """ - Format for tabular dataset export. + Format for tabular dataset export. """ """ allowed enum values """ - ARROW = "ARROW" - CSV = "CSV" + ARROW = 'ARROW' + CSV = 'CSV' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TableExportFormat from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/three_dimensional_aggregation.py b/foundry/models/three_dimensional_aggregation.py index 15966c667..c688b1934 100644 --- a/foundry/models/three_dimensional_aggregation.py +++ b/foundry/models/three_dimensional_aggregation.py @@ -39,18 +39,21 @@ from foundry.models.two_dimensional_aggregation import TwoDimensionalAggregation from typing_extensions import Self - class ThreeDimensionalAggregation(BaseModel): """ ThreeDimensionalAggregation - """ # noqa: E501 - + """ # noqa: E501 key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["threeDimensionalAggregation"] value_type: TwoDimensionalAggregation = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,15 +81,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -98,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/time_series_item_type.py b/foundry/models/time_series_item_type.py index 770ed56bb..ea15062ad 100644 --- a/foundry/models/time_series_item_type.py +++ b/foundry/models/time_series_item_type.py @@ -30,7 +30,6 @@ import json import pprint from typing import Union - try: from typing import Annotated except ImportError: @@ -44,12 +43,15 @@ from foundry.models.string_type import StringType + """ A union of the types supported by time series properties. """ TimeSeriesItemType = Annotated[Union[DoubleType, StringType], Field(discriminator="type")] + + # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. diff --git a/foundry/models/timeseries_type.py b/foundry/models/timeseries_type.py index 64e0ce21e..415e94abd 100644 --- a/foundry/models/timeseries_type.py +++ b/foundry/models/timeseries_type.py @@ -38,17 +38,20 @@ from foundry.models.time_series_item_type import TimeSeriesItemType from typing_extensions import Self - class TimeseriesType(BaseModel): """ TimeseriesType - """ # noqa: E501 - + """ # noqa: E501 item_type: TimeSeriesItemType = Field(alias="itemType") type: Literal["timeseries"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,12 +79,13 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict["itemType"] = self.item_type.to_dict() + _dict['itemType'] = self.item_type.to_dict() return _dict @classmethod @@ -93,10 +97,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/timestamp_type.py b/foundry/models/timestamp_type.py index e4ab4bb47..dbfe8299c 100644 --- a/foundry/models/timestamp_type.py +++ b/foundry/models/timestamp_type.py @@ -36,16 +36,19 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self - class TimestampType(BaseModel): """ TimestampType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["timestamp"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -73,7 +76,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -87,10 +91,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction.py b/foundry/models/transaction.py index b66b14361..60f3ccd3b 100644 --- a/foundry/models/transaction.py +++ b/foundry/models/transaction.py @@ -39,31 +39,23 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self - class Transaction(BaseModel): """ - An operation that modifies the files within a dataset. - """ # noqa: E501 - - closed_time: Optional[datetime] = Field( - default=None, - description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", - alias="closedTime", - ) - created_time: datetime = Field( - description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", - alias="createdTime", - ) - rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. " - ) + An operation that modifies the files within a dataset. + """ # noqa: E501 + closed_time: Optional[datetime] = Field(default=None, description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", alias="closedTime") + created_time: datetime = Field(description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", alias="createdTime") + rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ") status: TransactionStatus transaction_type: TransactionType = Field(alias="transactionType") - __properties: ClassVar[Set[str]] = set( - ("closedTime", "createdTime", "rid", "status", "transactionType") - ) + __properties: ClassVar[Set[str]] = set(("closedTime", "createdTime", "rid", "status", "transactionType")) + + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -91,7 +83,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -105,10 +98,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/transaction_not_committed.py b/foundry/models/transaction_not_committed.py deleted file mode 100644 index 173635a72..000000000 --- a/foundry/models/transaction_not_committed.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters -from typing_extensions import Self - - -class TransactionNotCommitted(BaseModel): - """ - The given transaction has not been committed. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of TransactionNotCommitted from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/transaction_not_committed_parameters.py b/foundry/models/transaction_not_committed_parameters.py deleted file mode 100644 index beaf630a3..000000000 --- a/foundry/models/transaction_not_committed_parameters.py +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from foundry.models.transaction_status import TransactionStatus -from typing_extensions import Self - - -class TransactionNotCommittedParameters(BaseModel): - """ - TransactionNotCommittedParameters - """ # noqa: E501 - - dataset_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ", - alias="datasetRid", - ) - transaction_rid: StrictStr = Field( - description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", - alias="transactionRid", - ) - transaction_status: TransactionStatus = Field(alias="transactionStatus") - __properties: ClassVar[Set[str]] = set(("datasetRid", "transactionRid", "transactionStatus")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of TransactionNotCommittedParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/transaction_not_found.py b/foundry/models/transaction_not_found.py deleted file mode 100644 index 9a5b03a38..000000000 --- a/foundry/models/transaction_not_found.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.abort_transaction_permission_denied_parameters import ( - AbortTransactionPermissionDeniedParameters, -) -from typing_extensions import Self - - -class TransactionNotFound(BaseModel): - """ - The requested transaction could not be found on the dataset, or the client token does not have access to it. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: AbortTransactionPermissionDeniedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("NOT_FOUND"): - raise ValueError("must be one of enum values ('NOT_FOUND')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of TransactionNotFound from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/transaction_not_open.py b/foundry/models/transaction_not_open.py deleted file mode 100644 index 871afd83e..000000000 --- a/foundry/models/transaction_not_open.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.transaction_not_committed_parameters import TransactionNotCommittedParameters -from typing_extensions import Self - - -class TransactionNotOpen(BaseModel): - """ - The given transaction is not open. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: TransactionNotCommittedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of TransactionNotOpen from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/transaction_status.py b/foundry/models/transaction_status.py index c8790b6e3..feb53c84e 100644 --- a/foundry/models/transaction_status.py +++ b/foundry/models/transaction_status.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,17 +42,19 @@ class TransactionStatus(str, Enum): """ - The status of a Transaction. + The status of a Transaction. """ """ allowed enum values """ - ABORTED = "ABORTED" - COMMITTED = "COMMITTED" - OPEN = "OPEN" + ABORTED = 'ABORTED' + COMMITTED = 'COMMITTED' + OPEN = 'OPEN' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionStatus from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/transaction_type.py b/foundry/models/transaction_type.py index 4bedfadc0..26b0bb8e9 100644 --- a/foundry/models/transaction_type.py +++ b/foundry/models/transaction_type.py @@ -33,6 +33,7 @@ from enum import Enum + try: from typing import Self except ImportError: @@ -41,18 +42,20 @@ class TransactionType(str, Enum): """ - The type of a Transaction. + The type of a Transaction. """ """ allowed enum values """ - APPEND = "APPEND" - UPDATE = "UPDATE" - SNAPSHOT = "SNAPSHOT" - DELETE = "DELETE" + APPEND = 'APPEND' + UPDATE = 'UPDATE' + SNAPSHOT = 'SNAPSHOT' + DELETE = 'DELETE' @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionType from a JSON string""" return cls(json.loads(json_str)) + + diff --git a/foundry/models/two_dimensional_aggregation.py b/foundry/models/two_dimensional_aggregation.py index 3d7e8328c..aca1dd877 100644 --- a/foundry/models/two_dimensional_aggregation.py +++ b/foundry/models/two_dimensional_aggregation.py @@ -39,18 +39,21 @@ from foundry.models.query_aggregation_value_type import QueryAggregationValueType from typing_extensions import Self - class TwoDimensionalAggregation(BaseModel): """ TwoDimensionalAggregation - """ # noqa: E501 - + """ # noqa: E501 key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["twoDimensionalAggregation"] value_type: QueryAggregationValueType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,15 +81,16 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict["keyType"] = self.key_type.to_dict() + _dict['keyType'] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict["valueType"] = self.value_type.to_dict() + _dict['valueType'] = self.value_type.to_dict() return _dict @classmethod @@ -98,10 +102,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/unknown_distance_unit.py b/foundry/models/unknown_distance_unit.py deleted file mode 100644 index 3f280663a..000000000 --- a/foundry/models/unknown_distance_unit.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.unknown_distance_unit_parameters import UnknownDistanceUnitParameters -from typing_extensions import Self - - -class UnknownDistanceUnit(BaseModel): - """ - An unknown distance unit was provided. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: UnknownDistanceUnitParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UnknownDistanceUnit from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/unknown_distance_unit_parameters.py b/foundry/models/unknown_distance_unit_parameters.py deleted file mode 100644 index 8347af357..000000000 --- a/foundry/models/unknown_distance_unit_parameters.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from foundry.models.distance_unit import DistanceUnit -from typing_extensions import Self - - -class UnknownDistanceUnitParameters(BaseModel): - """ - UnknownDistanceUnitParameters - """ # noqa: E501 - - known_units: Optional[List[DistanceUnit]] = Field(default=None, alias="knownUnits") - unknown_unit: StrictStr = Field(alias="unknownUnit") - __properties: ClassVar[Set[str]] = set(("knownUnits", "unknownUnit")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UnknownDistanceUnitParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/unknown_parameter.py b/foundry/models/unknown_parameter.py deleted file mode 100644 index 896659443..000000000 --- a/foundry/models/unknown_parameter.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.unknown_parameter_parameters import UnknownParameterParameters -from typing_extensions import Self - - -class UnknownParameter(BaseModel): - """ - The provided parameters were not found. Please look at the `knownParameters` field to see which ones are available. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: UnknownParameterParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UnknownParameter from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/unknown_parameter_parameters.py b/foundry/models/unknown_parameter_parameters.py deleted file mode 100644 index a0a0a0c6a..000000000 --- a/foundry/models/unknown_parameter_parameters.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr -from pydantic import Field -from typing_extensions import Self - - -class UnknownParameterParameters(BaseModel): - """ - UnknownParameterParameters - """ # noqa: E501 - - expected_parameters: Optional[List[StrictStr]] = Field(default=None, alias="expectedParameters") - unknown_parameters: Optional[List[StrictStr]] = Field(default=None, alias="unknownParameters") - __properties: ClassVar[Set[str]] = set(("expectedParameters", "unknownParameters")) - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UnknownParameterParameters from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/unsupported_object_set.py b/foundry/models/unsupported_object_set.py deleted file mode 100644 index e10612026..000000000 --- a/foundry/models/unsupported_object_set.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from typing_extensions import Self - - -class UnsupportedObjectSet(BaseModel): - """ - The requested object set is not supported. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: Union[str, Any] - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("INVALID_ARGUMENT"): - raise ValueError("must be one of enum values ('INVALID_ARGUMENT')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UnsupportedObjectSet from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/unsupported_type.py b/foundry/models/unsupported_type.py index c816a5ae6..770c3217d 100644 --- a/foundry/models/unsupported_type.py +++ b/foundry/models/unsupported_type.py @@ -37,17 +37,20 @@ from pydantic import Field from typing_extensions import Self - class UnsupportedType(BaseModel): """ UnsupportedType - """ # noqa: E501 - + """ # noqa: E501 type: Literal["unsupported"] unsupported_type: Literal["unsupported"] = Field(alias="unsupportedType") __properties: ClassVar[Set[str]] = set(("type", "unsupportedType")) - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} + model_config = { + "populate_by_name": True, + "validate_assignment": True, + "extra": "forbid" + } + def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -75,7 +78,8 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={}, + exclude={ + }, exclude_none=True, ) return _dict @@ -89,10 +93,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) + allow_extra and + isinstance(obj, dict) and + any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + + diff --git a/foundry/models/upload_file_permission_denied.py b/foundry/models/upload_file_permission_denied.py deleted file mode 100644 index 7a04bcd70..000000000 --- a/foundry/models/upload_file_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.file_already_exists_parameters import FileAlreadyExistsParameters -from typing_extensions import Self - - -class UploadFilePermissionDenied(BaseModel): - """ - The provided token does not have permission to upload the given file to the given dataset and transaction. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: FileAlreadyExistsParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of UploadFilePermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/models/view_object_permission_denied.py b/foundry/models/view_object_permission_denied.py deleted file mode 100644 index 240d921c9..000000000 --- a/foundry/models/view_object_permission_denied.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# coding: utf-8 - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import json - - -from typing import Any, ClassVar, Dict, List, Optional -from typing import Set -from pydantic import BaseModel, StrictStr, field_validator -from pydantic import Field -from foundry.models.object_type_not_synced_parameters import ObjectTypeNotSyncedParameters -from typing_extensions import Self - - -class ViewObjectPermissionDenied(BaseModel): - """ - The user does not have permission to view objects of this `ObjectType`. - """ # noqa: E501 - - error_code: StrictStr = Field(alias="errorCode") - error_instance_id: Optional[StrictStr] = Field(default=None, alias="errorInstanceId") - error_name: StrictStr = Field(alias="errorName") - parameters: ObjectTypeNotSyncedParameters - __properties: ClassVar[Set[str]] = set( - ("errorCode", "errorInstanceId", "errorName", "parameters") - ) - - @field_validator("error_code") - def error_code_validate_enum(cls, value): - """Validates the enum""" - if value not in ("PERMISSION_DENIED"): - raise ValueError("must be one of enum values ('PERMISSION_DENIED')") - return value - - model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str, *, allow_extra=False) -> Self: - """Create an instance of ViewObjectPermissionDenied from a JSON string""" - return cls.from_dict(json.loads(json_str), allow_extra=allow_extra) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of parameters - if self.parameters: - _dict["parameters"] = self.parameters.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: - """Create an instance of AsyncActionOperation from a dict""" - # If allowing extra properties and the given object is a dict, - # then remove any properties in the dict that aren't present - # in the model properties list - # We need to do this since the model config forbids additional properties - # and this cannot be changed at runtime - if ( - allow_extra - and isinstance(obj, dict) - and any(key not in cls.__properties for key in obj) - ): - obj = {key: value for key, value in obj.items() if key in cls.__properties} - - return cls.model_validate(obj) diff --git a/foundry/py.typed b/foundry/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/foundry/rest.py b/foundry/rest.py deleted file mode 100644 index a9c664497..000000000 --- a/foundry/rest.py +++ /dev/null @@ -1,197 +0,0 @@ -# Copyright 2024 Palantir Technologies, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" - Palantir OpenAPI - - The Palantir REST API. Please see https://www.palantir.com/docs for more details. - - The version of the OpenAPI document: 1.738.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import io -import json -import re -import ssl -from typing import Optional -from typing import Protocol - -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from foundry.exceptions import ApiValueError, OpenApiException -from foundry.configuration import Configuration - - -# This is needed since there is no easy way to type both urllib 1.0 and 2.0 together -# This is because the HTTP response type for 2.0 doesn't exist in 1.0 -# This protocol works with both versions though and allows things to be typed in both -class Urllib3Response(Protocol): - status: int - reason: Optional[str] - headers: HTTPHeaderDict - - @property - def data(self) -> bytes: - ... - - -class RESTResponse(io.IOBase): - def __init__(self, resp: Urllib3Response) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - def getheaders(self): - """Returns a dictionary of the response headers.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - def __init__(self, configuration: Configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - addition_pool_args = {} - - if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries - - self.pool_manager = urllib3.PoolManager(cert_reqs=cert_reqs, **addition_pool_args) - - def request( - self, method, url, headers=None, body=None, post_params=None, _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ["GET", "HEAD", "DELETE", "POST", "PUT", "PATCH", "OPTIONS"] - - if post_params and body: - raise ApiValueError("body parameter cannot be used with post_params parameter.") - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif isinstance(_request_timeout, tuple) and len(_request_timeout) == 2: - timeout = urllib3.Timeout(connect=_request_timeout[0], read=_request_timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]: - # no content type provided or payload is json - content_type = headers.get("Content-Type") - if not content_type or re.search("json", content_type, re.IGNORECASE): - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False, - ) - elif content_type == "application/x-www-form-urlencoded": - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False, - ) - elif content_type == "multipart/form-data": - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers["Content-Type"] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False, - ) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False, - ) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise OpenApiException(msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, url, fields={}, timeout=timeout, headers=headers, preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise OpenApiException(msg) - - return RESTResponse(r) diff --git a/openapi.yml b/openapi.yml index 860765016..0d0835508 100644 --- a/openapi.yml +++ b/openapi.yml @@ -1,96 +1,5 @@ components: schemas: - AbortTransactionPermissionDenied: - description: The provided token does not have permission to abort the given - treansaction on the given dataset. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - transactionRid - type: object - required: - - errorName - - errorCode - - parameters - ActionContainsDuplicateEdits: - description: The given action request has multiple edits on the same object. - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ActionEditedPropertiesNotFound: - description: 'Actions attempted to edit properties that could not be found on - the object type. - - Please contact the Ontology administrator to resolve this issue. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ActionNotFound: - description: The action is not found, or the user does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - actionRid: - $ref: '#/components/schemas/ActionRid' - required: - - actionRid - type: object - required: - - errorName - - errorCode - - parameters ActionParameterArrayType: properties: subType: @@ -101,58 +10,6 @@ components: - subType - type type: object - ActionParameterObjectNotFound: - description: 'The parameter object reference or parameter default value is not - found, or the client token does not have access to it. - - ' - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameterId: - $ref: '#/components/schemas/ParameterId' - required: - - parameterId - type: object - required: - - errorName - - errorCode - - parameters - ActionParameterObjectTypeNotFound: - description: 'The parameter references an object type that could not be found, - or the client token does not have access to it. - - ' - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameterId: - $ref: '#/components/schemas/ParameterId' - required: - - parameterId - type: object - required: - - errorName - - errorCode - - parameters ActionParameterType: description: 'A union of all the types supported by Ontology Action parameters. @@ -196,9 +53,6 @@ components: - dataType - required type: object - ActionRid: - description: The unique resource identifier for an action. - type: string ActionType: description: Represents an action type in the Ontology. properties: @@ -233,30 +87,6 @@ components: ' type: string - ActionTypeNotFound: - description: The action type is not found, or the user does not have access - to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - actionType: - $ref: '#/components/schemas/ActionTypeApiName' - rid: - $ref: '#/components/schemas/ActionTypeRid' - type: object - required: - - errorName - - errorCode - - parameters ActionTypeRid: description: 'The unique resource identifier of an action type, useful for interacting with other Foundry APIs. @@ -289,63 +119,6 @@ components: - rid - status type: object - ActionValidationFailed: - description: 'The validation failed for the given action parameters. Please - use the `validateAction` endpoint for more - - details. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - actionType: - $ref: '#/components/schemas/ActionTypeApiName' - required: - - actionType - type: object - required: - - errorName - - errorCode - - parameters - AggregationGroupCountExceededLimit: - description: 'The number of groups in the aggregations grouping exceeded the - allowed limit. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - groupsCount: - type: integer - groupsLimit: - type: integer - required: - - groupsCount - - groupsLimit - type: object - required: - - errorName - - errorCode - - parameters AnyType: properties: type: @@ -353,155 +126,6 @@ components: required: - type type: object - ApiFeaturePreviewUsageOnly: - description: 'This feature is only supported in preview mode. Please use `preview=true` - in the query - - parameters to call this endpoint. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ApiUsageDenied: - description: You are not allowed to use Palantir APIs. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ApplyActionFailed: - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ApplyActionMode: - enum: - - VALIDATE_ONLY - - VALIDATE_AND_EXECUTE - type: string - ApplyActionRequestOptions: - properties: - mode: - $ref: '#/components/schemas/ApplyActionMode' - returnEdits: - $ref: '#/components/schemas/ReturnEditsMode' - type: object - ArtifactRepositoryRid: - type: string - AsyncOperationError: - properties: - errorCode: - type: string - errorInstanceId: - type: string - errorName: - type: string - parameters: - additionalProperties: {} - type: object - type: - type: string - required: - - errorCode - - errorName - - type - type: object - AttachmentNotFound: - description: "The requested attachment is not found, or the client token does\ - \ not have access to it. \nAttachments that are not attached to any objects\ - \ are deleted after two weeks.\nAttachments that have not been attached to\ - \ an object can only be viewed by the user who uploaded them.\nAttachments\ - \ that have been attached to an object can be viewed by users who can view\ - \ the object.\n" - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - attachmentRid: - $ref: '#/components/schemas/AttachmentRid' - type: object - required: - - errorName - - errorCode - - parameters - AttachmentRid: - description: The unique resource identifier of an attachment. - type: string - AttachmentSizeExceededLimit: - description: 'The file is too large to be uploaded as an attachment. - - The maximum attachment size is 200MB. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - fileLimitBytes: - type: string - fileSizeBytes: - type: string - required: - - fileLimitBytes - - fileSizeBytes - type: object - required: - - errorName - - errorCode - - parameters AttachmentType: properties: type: @@ -554,65 +178,11 @@ components: required: - branchId type: object - BranchAlreadyExists: - description: The branch cannot be created because a branch with that name already - exists. - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters BranchId: description: 'The identifier (name) of a Branch. Example: `master`. ' type: string - BranchNotFound: - description: The requested branch could not be found, or the client token does - not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters ByteType: properties: type: @@ -620,118 +190,9 @@ components: required: - type type: object - ColumnTypesNotSupported: - description: The dataset contains column types that are not supported. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters - CommitTransactionPermissionDenied: - description: The provided token does not have permission to commit the given - treansaction on the given dataset. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - transactionRid - type: object - required: - - errorName - - errorCode - - parameters - CompositePrimaryKeyNotSupported: - description: 'Primary keys consisting of multiple properties are not supported - by this API. If you need support for this, - - please reach out to Palantir Support. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - primaryKey: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters Coordinate: format: double type: number - CreateBranchPermissionDenied: - description: The provided token does not have permission to create a branch - of this dataset. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters CreateBranchRequest: properties: branchId: @@ -741,33 +202,6 @@ components: required: - branchId type: object - CreateDatasetPermissionDenied: - description: The provided token does not have permission to create a dataset - in this folder. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - name: - $ref: '#/components/schemas/DatasetName' - parentFolderRid: - $ref: '#/components/schemas/FolderRid' - required: - - name - - parentFolderRid - type: object - required: - - errorName - - errorCode - - parameters CreateDatasetRequest: properties: name: @@ -807,109 +241,11 @@ components: - objectTypeApiName - type type: object - CreateTransactionPermissionDenied: - description: The provided token does not have permission to create a transaction - on this dataset. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters CreateTransactionRequest: properties: transactionType: $ref: '#/components/schemas/TransactionType' type: object - DataValue: - description: 'Represents the value of data in the following format. Note that - these values can be nested, for example an array of structs. - - | Type | JSON encoding | - Example | - - |-----------------------------|-------------------------------------------------------|-------------------------------------------------------------------------------| - - | Array | array | - `["alpha", "bravo", "charlie"]` | - - | Attachment | string | - `"ri.attachments.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"` | - - | Boolean | boolean | - `true` | - - | Byte | number | - `31` | - - | Date | ISO 8601 extended local date string | - `"2021-05-01"` | - - | Decimal | string | - `"2.718281828"` | - - | Float | number | - `3.14159265` | - - | Double | number | - `3.14159265` | - - | Integer | number | - `238940` | - - | Long | string | - `"58319870951433"` | - - | Null | null | - `null` | - - | Object Set | string | - `ri.object-set.main.versioned-object-set.h13274m8-23f5-431c-8aee-a4554157c57z`| - - | Ontology Object Reference | JSON encoding of the object''s primary key | - `10033123` or `"EMP1234"` | - - | Set | array | - `["alpha", "bravo", "charlie"]` | - - | Short | number | - `8739` | - - | String | string | - `"Call me Ishmael"` | - - | Struct | JSON object | - `{"name": "John Doe", "age": 42}` | - - | TwoDimensionalAggregation | JSON object | - `{"groups": [{"key": "alpha", "value": 100}, {"key": "beta", "value": 101}]}` - | - - | ThreeDimensionalAggregation | JSON object | - `{"groups": [{"key": "NYC", "groups": [{"key": "Engineer", "value" : 100}]}]}`| - - | Timestamp | ISO 8601 extended offset date-time string - in UTC zone | `"2021-01-04T05:00:00Z"` | - - ' Dataset: properties: name: @@ -925,30 +261,6 @@ components: type: object DatasetName: type: string - DatasetNotFound: - description: The requested dataset could not be found, or the client token does - not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters DatasetRid: description: 'The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. @@ -972,33 +284,6 @@ components: required: - type type: object - DeleteBranchPermissionDenied: - description: The provided token does not have permission to delete the given - branch from this dataset. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters DeleteLinkRule: properties: aSideObjectTypeApiName: @@ -1028,34 +313,6 @@ components: - objectTypeApiName - type type: object - DeleteSchemaPermissionDenied: - description: todo - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters DeploymentApi: properties: transform: @@ -1096,54 +353,6 @@ components: - api - apiName type: object - DeploymentNotAvailable: - description: The requested model deployment does not have a model deployed. - It may be disabled or failed. - properties: - errorCode: - enum: - - INTERNAL - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - deploymentApiName: - $ref: '#/components/schemas/DeploymentApiName' - ontologyApiName: - $ref: '#/components/schemas/OntologyApiName' - type: object - required: - - errorName - - errorCode - - parameters - DeploymentNotFound: - description: The requested model deployment is not found, or the client token - does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - deploymentApiName: - $ref: '#/components/schemas/DeploymentApiName' - ontologyApiName: - $ref: '#/components/schemas/OntologyApiName' - type: object - required: - - errorName - - errorCode - - parameters DeploymentTransformApi: properties: inputs: @@ -1158,18 +367,6 @@ components: DisplayName: description: The display name of the entity. type: string - DistanceUnit: - enum: - - MILLIMETERS - - CENTIMETERS - - METERS - - KILOMETERS - - INCHES - - FEET - - YARDS - - MILES - - NAUTICAL_MILES - type: string DoubleType: properties: type: @@ -1177,49 +374,6 @@ components: required: - type type: object - DuplicateOrderBy: - description: The requested sort order includes duplicate properties. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - properties: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - type: object - required: - - errorName - - errorCode - - parameters - EditObjectPermissionDenied: - description: 'The user does not have permission to edit this `ObjectType`. - - ' - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters FieldName: description: 'The name of a field. @@ -1242,109 +396,10 @@ components: - transactionRid - updatedTime type: object - FileAlreadyExists: - description: The given file path already exists in the dataset and transaction. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - path: - $ref: '#/components/schemas/FilePath' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - path - - transactionRid - type: object - required: - - errorName - - errorCode - - parameters - FileNotFoundOnBranch: - description: The requested file could not be found on the given branch, or the - client token does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - path: - $ref: '#/components/schemas/FilePath' - required: - - branchId - - datasetRid - - path - type: object - required: - - errorName - - errorCode - - parameters - FileNotFoundOnTransactionRange: - description: The requested file could not be found on the given transaction - range, or the client token does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - endTransactionRid: - $ref: '#/components/schemas/TransactionRid' - path: - $ref: '#/components/schemas/FilePath' - startTransactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - endTransactionRid - - path - type: object - required: - - errorName - - errorCode - - parameters FilePath: description: 'The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. - ' - type: string - FilterValue: - description: 'Represents the value of a property filter. For instance, false - is the FilterValue in - - `properties.{propertyApiName}.isNull=false`. - ' type: string FloatType: @@ -1354,141 +409,8 @@ components: required: - type type: object - FolderNotFound: - description: The requested folder could not be found, or the client token does - not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - folderRid: - $ref: '#/components/schemas/FolderRid' - required: - - folderRid - type: object - required: - - errorName - - errorCode - - parameters FolderRid: type: string - FunctionEncounteredUserFacingError: - description: 'The authored function failed to execute because of a user induced - error. The message argument - - is meant to be displayed to the user. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - message: - type: string - required: - - functionRid - - functionVersion - - message - type: object - required: - - errorName - - errorCode - - parameters - FunctionExecutionFailed: - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - required: - - functionRid - - functionVersion - type: object - required: - - errorName - - errorCode - - parameters - FunctionExecutionTimedOut: - properties: - errorCode: - enum: - - TIMEOUT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - required: - - functionRid - - functionVersion - type: object - required: - - errorName - - errorCode - - parameters - FunctionInvalidInput: - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - required: - - functionRid - - functionVersion - type: object - required: - - errorName - - errorCode - - parameters FunctionRid: description: 'The unique resource identifier of a Function, useful for interacting with other Foundry APIs. @@ -1582,711 +504,6 @@ components: required: - type type: object - InvalidAggregationRange: - description: 'Aggregation range should include one lt or lte and one gt or gte. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - InvalidAggregationRangePropertyType: - description: 'Range group by is not supported by property type. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - required: - - objectType - - property - - propertyBaseType - type: object - required: - - errorName - - errorCode - - parameters - InvalidAggregationRangeValue: - description: 'Aggregation value does not conform to the expected underlying - type. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - required: - - objectType - - property - - propertyBaseType - type: object - required: - - errorName - - errorCode - - parameters - InvalidApplyActionOptionCombination: - description: The given options are individually valid but cannot be used in - the given combination. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - invalidCombination: - $ref: '#/components/schemas/ApplyActionRequestOptions' - type: object - required: - - errorName - - errorCode - - parameters - InvalidBranchId: - description: The requested branch name cannot be used. Branch names cannot be - empty and must not look like RIDs or UUIDs. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - required: - - branchId - type: object - required: - - errorName - - errorCode - - parameters - InvalidContentLength: - description: A `Content-Length` header is required for all uploads, but was - missing or invalid. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - InvalidContentType: - description: 'The `Content-Type` cannot be inferred from the request content - and filename. - - Please check your request content and filename to ensure they are compatible. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - InvalidDurationGroupByPropertyType: - description: 'Invalid property type for duration groupBy. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - required: - - objectType - - property - - propertyBaseType - type: object - required: - - errorName - - errorCode - - parameters - InvalidDurationGroupByValue: - description: 'Duration groupBy value is invalid. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - InvalidFields: - description: TBD - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - properties: - items: - type: string - type: array - type: object - required: - - errorName - - errorCode - - parameters - InvalidGroupId: - description: The provided value for a group id must be a UUID. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - groupId: - type: string - required: - - groupId - type: object - required: - - errorName - - errorCode - - parameters - InvalidPageSize: - description: The provided page size was zero or negative. Page sizes must be - greater than zero. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - pageSize: - $ref: '#/components/schemas/PageSize' - required: - - pageSize - type: object - required: - - errorName - - errorCode - - parameters - InvalidPageToken: - description: The provided page token could not be used to retrieve the next - page of results. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - pageToken: - $ref: '#/components/schemas/PageToken' - required: - - pageToken - type: object - required: - - errorName - - errorCode - - parameters - InvalidParameterCombination: - description: The given parameters are individually valid but cannot be used - in the given combination. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - providedParameters: - items: - type: string - type: array - validCombinations: - items: - items: - type: string - type: array - type: array - type: object - required: - - errorName - - errorCode - - parameters - InvalidParameterValue: - description: 'The value of the given parameter is invalid. See the documentation - of `DataValue` for details on - - how parameters are represented. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameterBaseType: - $ref: '#/components/schemas/ValueType' - parameterDataType: - $ref: '#/components/schemas/OntologyDataType' - parameterId: - $ref: '#/components/schemas/ParameterId' - parameterValue: - $ref: '#/components/schemas/DataValue' - required: - - parameterId - type: object - required: - - errorName - - errorCode - - parameters - InvalidPropertyFilterValue: - description: 'The value of the given property filter is invalid. For instance, - 2 is an invalid value for - - `isNull` in `properties.address.isNull=2` because the `isNull` filter expects - a value of boolean type. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - expectedType: - $ref: '#/components/schemas/ValueType' - property: - $ref: '#/components/schemas/PropertyApiName' - propertyFilter: - $ref: '#/components/schemas/PropertyFilter' - propertyFilterValue: - $ref: '#/components/schemas/FilterValue' - required: - - expectedType - - property - - propertyFilter - - propertyFilterValue - type: object - required: - - errorName - - errorCode - - parameters - InvalidPropertyFiltersCombination: - description: The provided filters cannot be used together. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - property: - $ref: '#/components/schemas/PropertyApiName' - propertyFilters: - items: - $ref: '#/components/schemas/PropertyFilter' - type: array - required: - - property - type: object - required: - - errorName - - errorCode - - parameters - InvalidPropertyType: - description: 'The given property type is not of the expected type. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - required: - - property - - propertyBaseType - type: object - required: - - errorName - - errorCode - - parameters - InvalidPropertyValue: - description: 'The value of the given property is invalid. See the documentation - of `PropertyValue` for details on - - how properties are represented. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - propertyValue: - $ref: '#/components/schemas/PropertyValue' - required: - - property - - propertyBaseType - - propertyValue - type: object - required: - - errorName - - errorCode - - parameters - InvalidQueryParameterValue: - description: 'The value of the given parameter is invalid. See the documentation - of `DataValue` for details on - - how parameters are represented. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameterDataType: - $ref: '#/components/schemas/QueryDataType' - parameterId: - $ref: '#/components/schemas/ParameterId' - parameterValue: - $ref: '#/components/schemas/DataValue' - required: - - parameterDataType - - parameterId - type: object - required: - - errorName - - errorCode - - parameters - InvalidRangeQuery: - description: 'The specified query range filter is invalid. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - field: - type: string - gt: - description: Greater than - gte: - description: Greater than or equal - lt: - description: Less than - lte: - description: Less than or equal - required: - - field - type: object - required: - - errorName - - errorCode - - parameters - InvalidSortOrder: - description: 'The requested sort order of one or more properties is invalid. - Valid sort orders are ''asc'' or ''desc''. Sort - - order can also be omitted, and defaults to ''asc''. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - invalidSortOrder: - type: string - required: - - invalidSortOrder - type: object - required: - - errorName - - errorCode - - parameters - InvalidSortType: - description: The requested sort type of one or more clauses is invalid. Valid - sort types are 'p' or 'properties'. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - invalidSortType: - type: string - required: - - invalidSortType - type: object - required: - - errorName - - errorCode - - parameters - InvalidTransactionType: - description: The given transaction type is not valid. Valid transaction types - are `SNAPSHOT`, `UPDATE`, `APPEND`, and `DELETE`. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - transactionType: - $ref: '#/components/schemas/TransactionType' - required: - - datasetRid - - transactionRid - - transactionType - type: object - required: - - errorName - - errorCode - - parameters - InvalidUserId: - description: The provided value for a user id must be a UUID. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - userId: - type: string - required: - - userId - type: object - required: - - errorName - - errorCode - - parameters - LanguageModelSource: - enum: - - global - - hosted - type: string - LanguageModelSourceNotSupported: - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - source: - $ref: '#/components/schemas/LanguageModelSource' - required: - - source - type: object - required: - - errorName - - errorCode - - parameters LineString: properties: bbox: @@ -2331,61 +548,14 @@ components: $ref: '#/components/schemas/Position' minItems: 4 type: array - LinkAlreadyExists: - description: 'The link the user is attempting to create already exists. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters LinkTypeApiName: description: 'The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. - - ' - type: string - LinkTypeNotFound: - description: The link type is not found, or the user does not have access to - it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - linkType: - $ref: '#/components/schemas/LinkTypeApiName' - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - required: - - linkType - - objectType - type: object - required: - - errorName - - errorCode - - parameters + + ' + type: string LinkTypeSide: properties: apiName: @@ -2433,37 +603,6 @@ components: - objectTypeApiName - status type: object - LinkedObjectNotFound: - description: The linked object with the given primary key is not found, or the - user does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - linkType: - $ref: '#/components/schemas/LinkTypeApiName' - linkedObjectPrimaryKey: - additionalProperties: - $ref: '#/components/schemas/PrimaryKeyValue' - type: object - linkedObjectType: - $ref: '#/components/schemas/ObjectTypeApiName' - required: - - linkType - - linkedObjectType - type: object - required: - - errorName - - errorCode - - parameters ListActionTypesResponse: properties: data: @@ -2606,227 +745,6 @@ components: required: - type type: object - MalformedPropertyFilters: - description: 'At least one of requested filters are malformed. Please look at - the documentation of `PropertyFilter`. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - malformedPropertyFilter: - type: string - required: - - malformedPropertyFilter - type: object - required: - - errorName - - errorCode - - parameters - MarketplaceActionMappingNotFound: - description: The given action could not be mapped to a Marketplace installation. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - actionType: - $ref: '#/components/schemas/ActionTypeApiName' - artifactRepository: - $ref: '#/components/schemas/ArtifactRepositoryRid' - packageName: - $ref: '#/components/schemas/SdkPackageName' - required: - - actionType - - artifactRepository - - packageName - type: object - required: - - errorName - - errorCode - - parameters - MarketplaceInstallationNotFound: - description: 'The given marketplace installation could not be found or the user - does not have access to it. - - ' - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - artifactRepository: - $ref: '#/components/schemas/ArtifactRepositoryRid' - packageName: - $ref: '#/components/schemas/SdkPackageName' - required: - - artifactRepository - - packageName - type: object - required: - - errorName - - errorCode - - parameters - MarketplaceLinkMappingNotFound: - description: The given link could not be mapped to a Marketplace installation. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - artifactRepository: - $ref: '#/components/schemas/ArtifactRepositoryRid' - linkType: - $ref: '#/components/schemas/LinkTypeApiName' - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - packageName: - $ref: '#/components/schemas/SdkPackageName' - required: - - artifactRepository - - linkType - - objectType - - packageName - type: object - required: - - errorName - - errorCode - - parameters - MarketplaceObjectMappingNotFound: - description: The given object could not be mapped to a Marketplace installation. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - artifactRepository: - $ref: '#/components/schemas/ArtifactRepositoryRid' - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - packageName: - $ref: '#/components/schemas/SdkPackageName' - required: - - artifactRepository - - objectType - - packageName - type: object - required: - - errorName - - errorCode - - parameters - MarketplaceQueryMappingNotFound: - description: The given query could not be mapped to a Marketplace installation. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - artifactRepository: - $ref: '#/components/schemas/ArtifactRepositoryRid' - packageName: - $ref: '#/components/schemas/SdkPackageName' - queryType: - $ref: '#/components/schemas/QueryApiName' - required: - - artifactRepository - - packageName - - queryType - type: object - required: - - errorName - - errorCode - - parameters - MissingParameter: - description: 'Required parameters are missing. Please look at the `parameters` - field to see which required parameters are - - missing from the request. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameters: - items: - $ref: '#/components/schemas/ParameterId' - type: array - type: object - required: - - errorName - - errorCode - - parameters - MissingPostBody: - description: A post body is required for this endpoint, but was not found in - the request. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters ModelApiArrayType: properties: subType: @@ -2978,62 +896,6 @@ components: required: - type type: object - MultipleGroupByOnFieldNotSupported: - description: 'Aggregation cannot group by on the same field multiple times. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - duplicateFields: - items: - type: string - type: array - type: object - required: - - errorName - - errorCode - - parameters - MultiplePropertyValuesNotSupported: - description: 'One of the requested property filters does not support multiple - values. Please include only a single value for - - it. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - property: - $ref: '#/components/schemas/PropertyApiName' - propertyFilter: - $ref: '#/components/schemas/PropertyFilter' - required: - - property - - propertyFilter - type: object - required: - - errorName - - errorCode - - parameters NullType: properties: type: @@ -3041,73 +903,6 @@ components: required: - type type: object - ObjectAlreadyExists: - description: 'The object the user is attempting to create already exists. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ObjectChanged: - description: 'An object used by this `Action` was changed by someone else while - the `Action` was running. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters - ObjectNotFound: - description: The requested object is not found, or the client token does not - have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - primaryKey: - additionalProperties: - $ref: '#/components/schemas/PrimaryKeyValue' - type: object - type: object - required: - - errorName - - errorCode - - parameters ObjectPropertyType: description: 'A union of all the types supported by Ontology Object properties. @@ -3148,8 +943,6 @@ components: - $ref: '#/components/schemas/StringType' - $ref: '#/components/schemas/TimestampType' - $ref: '#/components/schemas/TimeseriesType' - ObjectSetRid: - type: string ObjectType: description: Represents an object type in the Ontology. properties: @@ -3190,58 +983,6 @@ components: ' type: string - ObjectTypeNotFound: - description: The requested object type is not found, or the client token does - not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - objectTypeRid: - $ref: '#/components/schemas/ObjectTypeRid' - type: object - required: - - errorName - - errorCode - - parameters - ObjectTypeNotSynced: - description: 'The requested object types are not synced into the ontology. Please - reach out to your Ontology - - Administrator to re-index the object type in Ontology Management Application. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters ObjectTypeRid: description: The unique resource identifier of an object type, useful for interacting with other Foundry APIs. @@ -3293,29 +1034,6 @@ components: required: - objectType type: object - ObjectsExceededLimit: - description: 'There are more objects, but they cannot be returned by this API. - Only 10,000 objects are available through this - - API for a given request. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters Ontology: description: Metadata about an Ontology. properties: @@ -3394,39 +1112,6 @@ components: - $ref: '#/components/schemas/OntologyObjectType' - $ref: '#/components/schemas/OntologyObjectSetType' - $ref: '#/components/schemas/UnsupportedType' - OntologyEditsExceededLimit: - description: 'The number of edits to the Ontology exceeded the allowed limit. - - This may happen because of the request or because the Action is modifying - too many objects. - - Please change the size of your request or contact the Ontology administrator. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - editsCount: - type: integer - editsLimit: - type: integer - required: - - editsCount - - editsLimit - type: object - required: - - errorName - - errorCode - - parameters OntologyFullMetadata: properties: actionTypes: @@ -3462,30 +1147,6 @@ components: - type - valueType type: object - OntologyNotFound: - description: The requested Ontology is not found, or the client token does not - have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - apiName: - $ref: '#/components/schemas/OntologyApiName' - ontologyRid: - $ref: '#/components/schemas/OntologyRid' - type: object - required: - - errorName - - errorCode - - parameters OntologyObjectArrayType: properties: subType: @@ -3562,34 +1223,6 @@ components: required: - type type: object - OntologySyncing: - description: 'The requested object type has been changed in the **Ontology Manager** - and changes are currently being applied. Wait a - - few seconds and try again. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters OntologyV2: description: Metadata about an Ontology. properties: @@ -3607,57 +1240,6 @@ components: - displayName - rid type: object - OpenTransactionAlreadyExists: - description: A transaction is already open on this dataset and branch. A branch - of a dataset can only have one open transaction at a time. - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters - OperationNotFound: - description: The operation is not found, or the user does not have access to - it. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - id: - type: string - required: - - id - type: object - required: - - errorName - - errorCode - - parameters PageSize: description: The page size to use for the endpoint. type: integer @@ -3666,178 +1248,27 @@ components: omitted from the first page''s request. To fetch the next page, clients should take the value from the `nextPageToken` - field of the previous response - - and populate the next request''s `pageToken` field with it. - - ' - type: string - Parameter: - description: Details about a parameter of an action or query. - properties: - baseType: - $ref: '#/components/schemas/ValueType' - dataType: - $ref: '#/components/schemas/OntologyDataType' - description: - type: string - required: - type: boolean - required: - - baseType - - required - type: object - ParameterId: - description: 'The unique identifier of the parameter. Parameters are used as - inputs when an action or query is applied. - - Parameters can be viewed and managed in the **Ontology Manager**. - - ' - type: string - ParameterObjectNotFound: - description: 'The parameter object reference or parameter default value is not - found, or the client token does not have access to it. - - ' - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - primaryKey: - additionalProperties: - $ref: '#/components/schemas/PrimaryKeyValue' - type: object - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters - ParameterObjectSetRidNotFound: - description: 'The parameter object set RID is not found, or the client token - does not have access to it. - - ' - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectSetRid: - $ref: '#/components/schemas/ObjectSetRid' - required: - - objectSetRid - type: object - required: - - errorName - - errorCode - - parameters - ParameterTypeNotSupported: - description: 'The type of the requested parameter is not currently supported - by this API. If you need support for this, - - please reach out to Palantir Support. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameterBaseType: - $ref: '#/components/schemas/ValueType' - parameterId: - $ref: '#/components/schemas/ParameterId' - required: - - parameterBaseType - - parameterId - type: object - required: - - errorName - - errorCode - - parameters - ParametersNotFound: - description: 'The provided parameter ID was not found for the action. Please - look at the `configuredParameterIds` field - - to see which ones are available. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - actionType: - $ref: '#/components/schemas/ActionTypeApiName' - configuredParameterIds: - items: - $ref: '#/components/schemas/ParameterId' - type: array - unknownParameterIds: - items: - $ref: '#/components/schemas/ParameterId' - type: array - required: - - actionType - type: object - required: - - errorName - - errorCode - - parameters - ParentAttachmentPermissionDenied: - description: 'The user does not have permission to parent attachments. + field of the previous response + + and populate the next request''s `pageToken` field with it. ' + type: string + Parameter: + description: Details about a parameter of an action or query. properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: + baseType: + $ref: '#/components/schemas/ValueType' + dataType: + $ref: '#/components/schemas/OntologyDataType' + description: type: string - parameters: - type: object + required: + type: boolean required: - - errorName - - errorCode - - parameters + - baseType + - required + type: object Polygon: properties: bbox: @@ -3888,131 +1319,6 @@ components: PreviewMode: description: Enables the use of preview functionality. type: boolean - PrimaryKeyValue: - description: Represents the primary key value that is used as a unique identifier - for an object. - PropertiesNotFilterable: - description: 'Results could not be filtered by the requested properties. Please - mark the properties as *Searchable* and - - *Selectable* in the **Ontology Manager** to be able to filter on those properties. - There may be a short delay - - between the time a property is marked *Searchable* and *Selectable* and when - it can be used. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - properties: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - type: object - required: - - errorName - - errorCode - - parameters - PropertiesNotFound: - description: The requested properties are not found on the object type. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - properties: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters - PropertiesNotSearchable: - description: 'Search is not enabled on the specified properties. Please mark - the properties as *Searchable* - - in the **Ontology Manager** to enable search on them. There may be a short - delay - - between the time a property is marked *Searchable* and when it can be used. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - propertyApiNames: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - type: object - required: - - errorName - - errorCode - - parameters - PropertiesNotSortable: - description: 'Results could not be ordered by the requested properties. Please - mark the properties as *Searchable* and - - *Sortable* in the **Ontology Manager** to enable their use in `orderBy` parameters. - There may be a short delay - - between the time a property is set to *Searchable* and *Sortable* and when - it can be used. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - properties: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - type: object - required: - - errorName - - errorCode - - parameters Property: description: Details about some property of an object. properties: @@ -4033,169 +1339,6 @@ components: ' type: string - PropertyApiNameNotFound: - description: 'A property that was required to have an API name, such as a primary - key, is missing one. You can set an API - - name for it using the **Ontology Manager**. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - propertyBaseType: - $ref: '#/components/schemas/ValueType' - propertyId: - $ref: '#/components/schemas/PropertyId' - required: - - propertyBaseType - - propertyId - type: object - required: - - errorName - - errorCode - - parameters - PropertyBaseTypeNotSupported: - description: 'The type of the requested property is not currently supported - by this API. If you need support for this, - - please reach out to Palantir Support. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - property: - $ref: '#/components/schemas/PropertyApiName' - propertyBaseType: - $ref: '#/components/schemas/ValueType' - required: - - objectType - - property - - propertyBaseType - type: object - required: - - errorName - - errorCode - - parameters - PropertyFilter: - description: "Represents a filter used on properties.\n\nEndpoints that accept\ - \ this supports optional parameters that have the form:\n`properties.{propertyApiName}.{propertyFilter}={propertyValueEscapedString}`\ - \ to filter the returned objects.\nFor instance, you may use `properties.firstName.eq=John`\ - \ to find objects that contain a property called\n\"firstName\" that has the\ - \ exact value of \"John\".\n\nThe following are a list of supported property\ - \ filters:\n\n- `properties.{propertyApiName}.contains` - supported on arrays\ - \ and can be used to filter array properties\n that have at least one of\ - \ the provided values. If multiple query parameters are provided, then objects\n\ - \ that have any of the given values for the specified property will be matched.\n\ - - `properties.{propertyApiName}.eq` - used to filter objects that have the\ - \ exact value for the provided\n property. If multiple query parameters are\ - \ provided, then objects that have any of the given values\n will be matched.\ - \ For instance, if the user provides a request by doing\n `?properties.firstName.eq=John&properties.firstName.eq=Anna`,\ - \ then objects that have a firstName property\n of either John or Anna will\ - \ be matched. This filter is supported on all property types except Arrays.\n\ - - `properties.{propertyApiName}.neq` - used to filter objects that do not\ - \ have the provided property values.\n Similar to the `eq` filter, if multiple\ - \ values are provided, then objects that have any of the given values\n will\ - \ be excluded from the result.\n- `properties.{propertyApiName}.lt`, `properties.{propertyApiName}.lte`,\ - \ `properties.{propertyApiName}.gt`\n `properties.{propertyApiName}.gte`\ - \ - represent less than, less than or equal to, greater than, and greater\n\ - \ than or equal to respectively. These are supported on date, timestamp,\ - \ byte, integer, long, double, decimal.\n- `properties.{propertyApiName}.isNull`\ - \ - used to filter objects where the provided property is (or is not) null.\n\ - \ This filter is supported on all property types.\n" - type: string - PropertyFiltersNotSupported: - description: 'At least one of the requested property filters are not supported. - See the documentation of `PropertyFilter` for - - a list of supported property filters. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - property: - $ref: '#/components/schemas/PropertyApiName' - propertyFilters: - items: - $ref: '#/components/schemas/PropertyFilter' - type: array - required: - - property - type: object - required: - - errorName - - errorCode - - parameters - PropertyId: - description: 'The immutable ID of a property. Property IDs are only used to - identify properties in the **Ontology Manager** - - application and assign them API names. In every other case, API names should - be used instead of property IDs. - - ' - type: string - PropertyTypesSearchNotSupported: - description: 'The search on the property types are not supported. See the `Search - Objects` documentation for - - a list of supported search queries on different property types. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parameters: - additionalProperties: - items: - $ref: '#/components/schemas/PropertyApiName' - type: array - type: object - type: object - required: - - errorName - - errorCode - - parameters PropertyV2: description: Details about some property of an object. properties: @@ -4208,73 +1351,6 @@ components: required: - dataType type: object - PropertyValue: - description: 'Represents the value of a property in the following format. - - - | Type | JSON encoding | Example | - - |----------- |-------------------------------------------------------|----------------------------------------------------------------------------------------------------| - - | Array | array | `["alpha", - "bravo", "charlie"]` | - - | Attachment | JSON encoded `AttachmentProperty` object | `{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}` | - - | Boolean | boolean | `true` | - - | Byte | number | `31` | - - | Date | ISO 8601 extended local date string | `"2021-05-01"` | - - | Decimal | string | `"2.718281828"` | - - | Double | number | `3.14159265` | - - | Float | number | `3.14159265` | - - | GeoPoint | geojson | `{"type":"Point","coordinates":[102.0,0.5]}` | - - | GeoShape | geojson | `{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}` | - - | Integer | number | `238940` | - - | Long | string | `"58319870951433"` | - - | Short | number | `8739` | - - | String | string | `"Call - me Ishmael"` | - - | Timestamp | ISO 8601 extended offset date-time string in UTC zone | `"2021-01-04T05:00:00Z"` | - - ' - PutSchemaPermissionDenied: - description: todo - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters QueryAggregationKeyType: description: 'A union of all the types supported by query aggregation keys. @@ -4399,91 +1475,6 @@ components: - $ref: '#/components/schemas/QueryUnionType' - $ref: '#/components/schemas/NullType' - $ref: '#/components/schemas/UnsupportedType' - QueryEncounteredUserFacingError: - description: 'The authored `Query` failed to execute because of a user induced - error. The message argument - - is meant to be displayed to the user. - - ' - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - message: - type: string - required: - - functionRid - - functionVersion - - message - type: object - required: - - errorName - - errorCode - - parameters - QueryMemoryExceededLimit: - description: 'Memory limits were exceeded for the `Query` execution. - - ' - properties: - errorCode: - enum: - - TIMEOUT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - required: - - functionRid - - functionVersion - type: object - required: - - errorName - - errorCode - - parameters - QueryNotFound: - description: The query is not found, or the user does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - query: - $ref: '#/components/schemas/QueryApiName' - required: - - query - type: object - required: - - errorName - - errorCode - - parameters QueryParameterV2: description: Details about a parameter of a query. properties: @@ -4525,34 +1516,6 @@ components: required: - type type: object - QueryTimeExceededLimit: - description: 'Time limits were exceeded for the `Query` execution. - - ' - properties: - errorCode: - enum: - - TIMEOUT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - functionRid: - $ref: '#/components/schemas/FunctionRid' - functionVersion: - $ref: '#/components/schemas/FunctionVersion' - required: - - functionRid - - functionVersion - type: object - required: - - errorName - - errorCode - - parameters QueryType: description: Represents a query type in the Ontology. properties: @@ -4613,30 +1576,6 @@ components: required: - type type: object - ReadTablePermissionDenied: - description: The provided token does not have permission to read the given dataset - as a table. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - required: - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters ReleaseStatus: description: The release status of the entity. enum: @@ -4644,69 +1583,6 @@ components: - EXPERIMENTAL - DEPRECATED type: string - ResourceNameAlreadyExists: - description: The provided resource name is already in use by another resource - in the same folder. - properties: - errorCode: - enum: - - CONFLICT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - parentFolderRid: - $ref: '#/components/schemas/FolderRid' - resourceName: - type: string - required: - - parentFolderRid - - resourceName - type: object - required: - - errorName - - errorCode - - parameters - ReturnEditsMode: - enum: - - ALL - - NONE - type: string - SchemaNotFound: - description: A schema could not be found for the given dataset and branch, or - the client token does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - branchId: - $ref: '#/components/schemas/BranchId' - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - branchId - - datasetRid - type: object - required: - - errorName - - errorCode - - parameters - SdkPackageName: - type: string ShortType: properties: type: @@ -4803,91 +1679,6 @@ components: - status - transactionType type: object - TransactionNotCommitted: - description: The given transaction has not been committed. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - transactionStatus: - $ref: '#/components/schemas/TransactionStatus' - required: - - datasetRid - - transactionRid - - transactionStatus - type: object - required: - - errorName - - errorCode - - parameters - TransactionNotFound: - description: The requested transaction could not be found on the dataset, or - the client token does not have access to it. - properties: - errorCode: - enum: - - NOT_FOUND - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - transactionRid - type: object - required: - - errorName - - errorCode - - parameters - TransactionNotOpen: - description: The given transaction is not open. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - transactionStatus: - $ref: '#/components/schemas/TransactionStatus' - required: - - datasetRid - - transactionRid - - transactionStatus - type: object - required: - - errorName - - errorCode - - parameters TransactionRid: description: 'The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. @@ -4925,83 +1716,6 @@ components: - type - valueType type: object - UnknownDistanceUnit: - description: An unknown distance unit was provided. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - knownUnits: - items: - $ref: '#/components/schemas/DistanceUnit' - type: array - unknownUnit: - type: string - required: - - unknownUnit - type: object - required: - - errorName - - errorCode - - parameters - UnknownParameter: - description: 'The provided parameters were not found. Please look at the `knownParameters` - field - - to see which ones are available. - - ' - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - expectedParameters: - items: - $ref: '#/components/schemas/ParameterId' - type: array - unknownParameters: - items: - $ref: '#/components/schemas/ParameterId' - type: array - type: object - required: - - errorName - - errorCode - - parameters - UnsupportedObjectSet: - description: The requested object set is not supported. - properties: - errorCode: - enum: - - INVALID_ARGUMENT - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - type: object - required: - - errorName - - errorCode - - parameters UnsupportedType: properties: type: @@ -5012,36 +1726,6 @@ components: - type - unsupportedType type: object - UploadFilePermissionDenied: - description: The provided token does not have permission to upload the given - file to the given dataset and transaction. - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - datasetRid: - $ref: '#/components/schemas/DatasetRid' - path: - $ref: '#/components/schemas/FilePath' - transactionRid: - $ref: '#/components/schemas/TransactionRid' - required: - - datasetRid - - path - - transactionRid - type: object - required: - - errorName - - errorCode - - parameters ValueType: description: 'A string indicating the type of each data value. Note that these types can be nested, for example an array of @@ -5091,31 +1775,6 @@ components: ' type: string - ViewObjectPermissionDenied: - description: 'The user does not have permission to view objects of this `ObjectType`. - - ' - properties: - errorCode: - enum: - - PERMISSION_DENIED - type: string - errorInstanceId: - format: uuid - type: string - errorName: - type: string - parameters: - properties: - objectType: - $ref: '#/components/schemas/ObjectTypeApiName' - required: - - objectType - type: object - required: - - errorName - - errorCode - - parameters securitySchemes: BearerAuth: scheme: bearer diff --git a/pyproject.toml b/pyproject.toml index ce73168f9..6097a9e9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ packages = [{ include = "foundry" }] [tool.poetry.dependencies] python = "^3.8" -urllib3 = ">=1.26.5" +requests = "^2.0.0" python-dateutil = "*" pydantic = "^2.1.0" typing-extensions = ">=4.7.1" diff --git a/test/__init__.py b/test/__init__.py index 490e9ab88..2b4e3a13f 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/test/api/test_datasets_api_service_api.py b/test/api/test_datasets_api_service_api.py index 40859dff6..ebf64b51c 100644 --- a/test/api/test_datasets_api_service_api.py +++ b/test/api/test_datasets_api_service_api.py @@ -158,5 +158,7 @@ def test_read_table_can_pass_in_str(client: FoundryClient, monkeypatch): def test_read_table_can_pass_enum(client: FoundryClient, monkeypatch): mock_data_read(monkeypatch, data=b"hello") - res = client.datasets.read_table(format=TableExportFormat.CSV, dataset_rid="test.rid") + res = client.datasets.read_table( + format=TableExportFormat.CSV, dataset_rid="test.rid" + ) assert res == b"hello" diff --git a/test/auth/test_foundry_auth_token_client.py b/test/auth/test_foundry_auth_token_client.py index 22932e2be..00977ada5 100644 --- a/test/auth/test_foundry_auth_token_client.py +++ b/test/auth/test_foundry_auth_token_client.py @@ -17,56 +17,56 @@ from foundry import UserTokenAuth -@pytest.fixture -def temp_os_environ(): - old_environ = os.environ.copy() +# @pytest.fixture +# def temp_os_environ(): +# old_environ = os.environ.copy() - # Make sure to start with a clean slate - for key in ["FOUNDRY_HOSTNAME", "FOUNDRY_TOKEN"]: - if key in os.environ: - os.environ.pop(key) +# # Make sure to start with a clean slate +# for key in ["PALANTIR_HOSTNAME", "PALANTIR_TOKEN"]: +# if key in os.environ: +# os.environ.pop(key) - yield - os.environ = old_environ +# yield +# os.environ = old_environ -def test_load_from_env(temp_os_environ): - os.environ["FOUNDRY_HOSTNAME"] = "host_test" - os.environ["FOUNDRY_TOKEN"] = "token_test" - config = UserTokenAuth() - assert config.hostname == "host_test" - assert config.token == "token_test" +# def test_load_from_env(temp_os_environ): +# os.environ["PALANTIR_HOSTNAME"] = "host_test" +# os.environ["PALANTIR_TOKEN"] = "token_test" +# config = UserTokenAuth() +# assert config.hostname == "host_test" +# assert config._token == "token_test" -def test_load_from_env_missing_token(temp_os_environ): - os.environ["FOUNDRY_HOSTNAME"] = "host_test" - assert pytest.raises(ValueError, lambda: UserTokenAuth()) +# def test_load_from_env_missing_token(temp_os_environ): +# os.environ["PALANTIR_HOSTNAME"] = "host_test" +# assert pytest.raises(ValueError, lambda: UserTokenAuth()) -def test_load_from_env_missing_host(temp_os_environ): - os.environ["FOUNDRY_TOKEN"] = "token_test" - assert pytest.raises(ValueError, lambda: UserTokenAuth()) +# def test_load_from_env_missing_host(temp_os_environ): +# os.environ["PALANTIR_TOKEN"] = "token_test" +# assert pytest.raises(ValueError, lambda: UserTokenAuth()) -def test_can_pass_config(): - os.environ["FOUNDRY_HOSTNAME"] = "host_test" - os.environ["FOUNDRY_TOKEN"] = "token_test" - config = UserTokenAuth(hostname="host_test2", token="token_test2") - assert config.hostname == "host_test2" - assert config.token == "token_test2" +# def test_can_pass_config(): +# os.environ["PALANTIR_HOSTNAME"] = "host_test" +# os.environ["PALANTIR_TOKEN"] = "token_test" +# config = UserTokenAuth(hostname="host_test2", token="token_test2") +# assert config.hostname == "host_test2" +# assert config._token == "token_test2" def test_can_pass_config_missing_token(): - assert pytest.raises(ValueError, lambda: UserTokenAuth(hostname="test")) + assert pytest.raises(TypeError, lambda: UserTokenAuth(hostname="test")) # type: ignore def test_can_pass_config_missing_host(): - assert pytest.raises(ValueError, lambda: UserTokenAuth(token="test")) + assert pytest.raises(TypeError, lambda: UserTokenAuth(token="test")) # type: ignore -def test_checks_host_type(): - assert pytest.raises(ValueError, lambda: UserTokenAuth(hostname=1)) # type: ignore +# def test_checks_host_type(): +# assert pytest.raises(ValueError, lambda: UserTokenAuth(hostname=1)) # type: ignore -def test_checks_token_type(): - assert pytest.raises(ValueError, lambda: UserTokenAuth(token=1)) # type: ignore +# def test_checks_token_type(): +# assert pytest.raises(ValueError, lambda: UserTokenAuth(token=1)) # type: ignore diff --git a/test/auth/test_foundry_oauth_client.py b/test/auth/test_foundry_oauth_client.py index 1e4d9c7ee..886677286 100644 --- a/test/auth/test_foundry_oauth_client.py +++ b/test/auth/test_foundry_oauth_client.py @@ -14,7 +14,7 @@ import pytest from foundry import ConfidentialClientAuth -from foundry.exceptions import OpenApiException +from foundry._errors.not_authenticated import NotAuthenticated def test_fails_no_escopes(): @@ -39,14 +39,11 @@ def test_can_pass_config(): scopes=["hello"], ) - assert config.hostname == "hey.com" + assert config._hostname == "hey.com" assert config._client_id == "123" assert config._client_secret == "abc" - with pytest.raises(OpenApiException) as info: + with pytest.raises(NotAuthenticated) as info: config.get_token() - assert ( - str(info.value) - == "ConfidentialClientAuth has not been authenticated. Please call sign_in_as_service_user() first." - ) + assert str(info.value) == "Client has not been authenticated." diff --git a/test/models/test_create_dataset_request.py b/test/models/test_create_dataset_request.py index 3a9cfb12b..19bbe2168 100644 --- a/test/models/test_create_dataset_request.py +++ b/test/models/test_create_dataset_request.py @@ -39,7 +39,9 @@ def test_to_dict(): def test_from_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest.from_dict({"name": "FOLDER_NAME", "parentFolderRid": 123}), + lambda: CreateDatasetRequest.from_dict( + {"name": "FOLDER_NAME", "parentFolderRid": 123} + ), ) @@ -53,5 +55,7 @@ def test_from_fails_missing(): def test_init_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest(name="FOLDER_NAME", parentFolderRid=123), # type: ignore + lambda: CreateDatasetRequest( + name="FOLDER_NAME", parentFolderRid=123 # type: ignore + ), ) diff --git a/test/test_api_client.py b/test/test_api_client.py index 4f1ea25f3..3d64e75c0 100644 --- a/test/test_api_client.py +++ b/test/test_api_client.py @@ -14,20 +14,14 @@ import json import re +from typing import Dict from unittest.mock import ANY, Mock import pytest -from foundry.api_client import ApiClient -from foundry.configuration import Configuration -from foundry.exceptions import BadRequestException -from foundry.exceptions import UnauthorizedException -from foundry.exceptions import ForbiddenException -from foundry.exceptions import NotFoundException -from foundry.exceptions import ServiceException -from foundry.exceptions import SDKInternalError -from foundry.rest import RESTResponse +from foundry import PalantirRPCException from foundry import UserTokenAuth from foundry import __version__ +from foundry.api_client import ApiClient class AttrDict(dict): @@ -48,8 +42,8 @@ def __init__(self, *args, **kwargs): def test_user_agent(): """Test that the user agent is set correctly.""" - client = ApiClient(configuration=Configuration(UserTokenAuth(hostname="foo", token="bar"))) - client.rest_client.request = Mock() + client = ApiClient(auth=UserTokenAuth(hostname="foo", token="bar"), hostname="foo") + client.session.request = Mock(return_value=AttrDict(status_code=200)) client.call_api( method="POST", @@ -60,11 +54,11 @@ def test_user_agent(): body={}, post_params={}, files={}, - auth_settings={}, collection_formats={}, + response_types_map={}, ) - client.rest_client.request.assert_called_with( + client.session.request.assert_called_with( ANY, ANY, headers={"User-Agent": f"foundry-platform-sdk/{__version__}"}, @@ -74,30 +68,42 @@ def test_user_agent(): ) -def response_deserialize( +def call_api_helper( status_code: int, data: str, - headers: str, + headers: Dict[str, str], ): - client = ApiClient(configuration=Configuration(UserTokenAuth(hostname="foo", token="bar"))) - res = RESTResponse( - AttrDict(status=status_code, reason=None, data=data.encode(), headers=headers) # type: ignore + client = ApiClient(auth=UserTokenAuth(hostname="foo", token="bar"), hostname="foo") + + client.session.request = Mock( + return_value=AttrDict( + status_code=status_code, + headers=headers, + content=data.encode(), + text=data, + json=lambda: json.loads(data), + ) ) - res.read() - client.response_deserialize( - res, - {}, + + return client.call_api( + method="POST", + resource_path="/abc", + path_params={}, + query_params={}, + header_params={}, + body={}, + post_params={}, + files={}, + collection_formats={}, + response_types_map={}, ) -def test_response_deserialize_400(): - with pytest.raises(BadRequestException) as info: - response_deserialize(status_code=400, data=EXAMPLE_ERROR, headers="Header: A") +def test_call_api_400(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=400, data=EXAMPLE_ERROR, headers={"Header": "A"}) - assert info.value.status == 400 - assert info.value.body == EXAMPLE_ERROR - assert info.value.error_code == "ERROR_CODE" - assert info.value.error_name == "ERROR_NAME" + assert info.value.name == "ERROR_NAME" assert info.value.error_instance_id == "123" assert info.value.parameters == {} assert ( @@ -106,32 +112,26 @@ def test_response_deserialize_400(): ) -def test_response_deserialize_401(): - with pytest.raises(UnauthorizedException) as info: - response_deserialize(status_code=401, data=EXAMPLE_ERROR, headers="Header: A") - - assert info.value.status == 401 - assert ( - str(info.value) - == f"(401)\nReason: None\nHTTP response headers: Header: A\nHTTP response body: {EXAMPLE_ERROR}\n" - ) +def test_call_api_401(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=401, data=EXAMPLE_ERROR, headers={"Header": "A"}) -def test_response_deserialize_403(): - with pytest.raises(ForbiddenException) as info: - response_deserialize(status_code=403, data=EXAMPLE_ERROR, headers="Ha: Ha") +def test_call_api_403(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=403, data=EXAMPLE_ERROR, headers={"Ha": "Ha"}) -def test_response_deserialize_404(): - with pytest.raises(NotFoundException) as info: - response_deserialize(status_code=404, data=EXAMPLE_ERROR, headers="Ha: Ha") +def test_call_api_404(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=404, data=EXAMPLE_ERROR, headers={"Ha": "Ha"}) -def test_response_deserialize_500(): - with pytest.raises(ServiceException) as info: - response_deserialize(status_code=500, data=EXAMPLE_ERROR, headers="Ha: Ha") +def test_call_api_500(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=500, data=EXAMPLE_ERROR, headers={"Ha": "Ha"}) -def test_response_deserialize_333(): - with pytest.raises(SDKInternalError) as info: - response_deserialize(status_code=333, data=EXAMPLE_ERROR, headers="Ha: Ha") +def test_call_api_333(): + with pytest.raises(PalantirRPCException) as info: + call_api_helper(status_code=333, data=EXAMPLE_ERROR, headers={"Ha": "Ha"}) diff --git a/test/test_docs.py b/test/test_docs.py index 45194b83d..9e16b5561 100644 --- a/test/test_docs.py +++ b/test/test_docs.py @@ -19,14 +19,17 @@ def test_no_remaining_references(): try: # If this works, it means we are in the generator repository - from scripts.util import DOCS_PATH + from foundry_platform_sdk_generator.config import Config + + config = Config.load_config() + docs_path = config.docs_path except ModuleNotFoundError: # Otherwise, the docs are just located in the docs folder # This happens when we are running the tests in the generated SDK - DOCS_PATH = "docs" + docs_path = "docs" # Recursively search for .md files in the DOCS_PATH - for root, _, files in os.walk(DOCS_PATH): + for root, _, files in os.walk(docs_path): for file in files: if not file.endswith(".md"): continue diff --git a/test/test_exceptions.py b/test/test_exceptions.py index a46bbe54a..2335fb256 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -14,9 +14,9 @@ import re import pytest -from foundry.exceptions import SDKInternalError -from foundry.exceptions import OpenApiException -from foundry.exceptions import handle_unexpected +from foundry._errors.sdk_internal_error import SDKInternalError +from foundry._errors.sdk_internal_error import handle_unexpected +from foundry._errors.palantir_rpc_exception import PalantirRPCException def test_sdk_internal_error(): @@ -56,9 +56,9 @@ def raises_unknown_exception(): def test_handle_unexpected_ignores_known_exception(): @handle_unexpected def raises_known_exception(): - raise OpenApiException("test") + raise PalantirRPCException("test") - with pytest.raises(OpenApiException) as error: + with pytest.raises(PalantirRPCException) as error: raises_known_exception() assert str(error.value) == "test" diff --git a/test/utils.py b/test/utils.py index 3f018ab05..ca2117f89 100644 --- a/test/utils.py +++ b/test/utils.py @@ -12,22 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json +import json as jsn from unittest.mock import Mock + import pytest -from urllib3 import PoolManager +from requests import Session + from foundry import FoundryClient from foundry import UserTokenAuth @pytest.fixture def client(): - yield FoundryClient(auth=UserTokenAuth(hostname="test.com", token="test")) + yield FoundryClient(auth=UserTokenAuth(hostname="test.com", token="test"), hostname="test.com") def mock_responses(monkeypatch, request_responses: list): # Define a side_effect function for our mock. This will be called instead of the original method - def mock_request(_, method, url, body=None, **kwargs): + def mock_request(_, method, url, json=None, **kwargs): for request, response in request_responses: if request["method"] != method: continue @@ -35,25 +37,25 @@ def mock_request(_, method, url, body=None, **kwargs): if request["url"] != url: continue - if body is not None and request["body"] != json.loads(body): + if json is not None and json != request["body"]: continue # Mock response mock_response = Mock() - mock_response.status = response["status"] + mock_response.status_code = response["status"] if "body" in response: - mock_response.data = json.dumps(response["body"]).encode() + mock_response.content = jsn.dumps(response["body"]).encode() elif "data" in response: - mock_response.data = response["data"] + mock_response.content = response["data"] else: - mock_response.data = None + mock_response.content = None mock_response.headers = {} return mock_response - pytest.fail(f"Unexpected request: {method} {url} {body}") + pytest.fail(f"Unexpected request: {method} {url} {json}") # Use monkeypatch to replace the PoolManager.request method with our side_effect function - monkeypatch.setattr(PoolManager, "request", mock_request) + monkeypatch.setattr(Session, "request", mock_request) From 16dfcdad12cafe1e44cb9d975f41c7c27c47f7a5 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:38:56 -0400 Subject: [PATCH 06/22] refactor --- .circleci/config.yml | 20 +- README.md | 30 +- foundry/_core/__init__.py | 1 - foundry/_core/auth_utils.py | 6 +- foundry/_core/confidential_client_auth.py | 26 +- foundry/_core/foundry_token_auth_client.py | 2 +- foundry/_core/oauth.py | 1 + foundry/_core/palantir_session.py | 67 +- foundry/_core/public_client_auth.py | 15 +- foundry/_errors/environment_not_configured.py | 1 + foundry/_errors/not_authenticated.py | 1 + foundry/_errors/palantir_rpc_exception.py | 1 + foundry/_errors/sdk_internal_error.py | 8 +- foundry/api/__init__.py | 1 - foundry/api/datasets_api_service_api.py | 1189 +++++++---------- foundry/api/ontologies_api_service_api.py | 573 ++++---- foundry/api/ontologies_v2_api_service_api.py | 707 +++++----- foundry/models/action_parameter_type.py | 42 +- foundry/models/action_parameter_v2.py | 24 +- foundry/models/action_type.py | 43 +- foundry/models/action_type_v2.py | 43 +- foundry/models/any_type.py | 22 +- foundry/models/attachment_type.py | 22 +- foundry/models/binary_type.py | 22 +- foundry/models/boolean_type.py | 22 +- foundry/models/branch.py | 34 +- foundry/models/byte_type.py | 22 +- foundry/models/create_branch_request.py | 32 +- foundry/models/create_dataset_request.py | 22 +- foundry/models/create_link_rule.py | 52 +- foundry/models/create_object_rule.py | 27 +- foundry/models/create_transaction_request.py | 22 +- foundry/models/dataset.py | 26 +- foundry/models/date_type.py | 22 +- foundry/models/decimal_type.py | 22 +- foundry/models/delete_link_rule.py | 52 +- foundry/models/delete_object_rule.py | 27 +- foundry/models/deployment_api.py | 24 +- foundry/models/deployment_listing.py | 29 +- foundry/models/deployment_metadata.py | 31 +- foundry/models/deployment_transform_api.py | 26 +- foundry/models/double_type.py | 22 +- foundry/models/file.py | 31 +- foundry/models/float_type.py | 22 +- foundry/models/geo_point.py | 33 +- foundry/models/geo_point_type.py | 22 +- foundry/models/geo_shape_type.py | 22 +- foundry/models/geometry.py | 39 +- foundry/models/integer_type.py | 22 +- foundry/models/line_string.py | 37 +- foundry/models/link_type_side.py | 53 +- foundry/models/link_type_side_cardinality.py | 7 +- foundry/models/link_type_side_v2.py | 53 +- foundry/models/list_action_types_response.py | 30 +- .../models/list_action_types_response_v2.py | 30 +- foundry/models/list_branches_response.py | 34 +- foundry/models/list_deployments_response.py | 24 +- foundry/models/list_files_response.py | 30 +- foundry/models/list_object_types_response.py | 34 +- .../models/list_object_types_v2_response.py | 34 +- foundry/models/list_ontologies_response.py | 28 +- foundry/models/list_ontologies_v2_response.py | 28 +- .../list_outgoing_link_types_response.py | 34 +- .../list_outgoing_link_types_response_v2.py | 34 +- foundry/models/list_query_types_response.py | 30 +- .../models/list_query_types_response_v2.py | 30 +- foundry/models/logic_rule.py | 9 +- foundry/models/long_type.py | 22 +- foundry/models/model_api_data_type.py | 26 +- foundry/models/model_api_type.py | 137 +- foundry/models/model_property.py | 31 +- foundry/models/modify_object_rule.py | 27 +- foundry/models/multi_line_string.py | 40 +- foundry/models/multi_point.py | 31 +- foundry/models/multi_polygon.py | 42 +- foundry/models/null_type.py | 22 +- foundry/models/object_property_type.py | 47 +- foundry/models/object_type.py | 64 +- foundry/models/object_type_v2.py | 63 +- foundry/models/object_type_visibility.py | 9 +- foundry/models/object_type_with_link.py | 26 +- foundry/models/ontology.py | 30 +- foundry/models/ontology_data_type.py | 145 +- foundry/models/ontology_full_metadata.py | 30 +- foundry/models/ontology_object_set_type.py | 34 +- foundry/models/ontology_object_type.py | 32 +- foundry/models/ontology_v2.py | 30 +- foundry/models/parameter.py | 29 +- foundry/models/polygon.py | 40 +- foundry/models/property_v2.py | 28 +- foundry/models/query_aggregation_key_type.py | 17 +- .../query_aggregation_range_sub_type.py | 12 +- .../models/query_aggregation_range_type.py | 24 +- .../models/query_aggregation_value_type.py | 12 +- foundry/models/query_data_type.py | 142 +- foundry/models/query_parameter_v2.py | 24 +- foundry/models/query_type.py | 44 +- foundry/models/query_type_v2.py | 44 +- foundry/models/release_status.py | 9 +- foundry/models/short_type.py | 22 +- foundry/models/string_type.py | 22 +- foundry/models/table_export_format.py | 9 +- .../models/three_dimensional_aggregation.py | 26 +- foundry/models/time_series_item_type.py | 4 +- foundry/models/timeseries_type.py | 24 +- foundry/models/timestamp_type.py | 22 +- foundry/models/transaction.py | 43 +- foundry/models/transaction_status.py | 11 +- foundry/models/transaction_type.py | 13 +- foundry/models/two_dimensional_aggregation.py | 26 +- foundry/models/unsupported_type.py | 22 +- test/__init__.py | 1 - test/api/test_datasets_api_service_api.py | 18 +- test/api/test_ontologies_api_service_api.py | 5 +- .../api/test_ontologies_v2_api_service_api.py | 5 +- test/models/test_create_dataset_request.py | 8 +- test/test_api_client.py | 14 +- test/test_exceptions.py | 13 +- test/utils.py | 26 +- tox.ini | 10 +- 120 files changed, 2725 insertions(+), 3063 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d3d23095..8d933627a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,14 +14,14 @@ jobs: type: string pydantic_version: type: string - urllib3_version: + requests_version: type: string docker: - image: cimg/python:<< parameters.python_version >> steps: - checkout - run: pip install --user tox - - run: tox -e py<< parameters.python_version >>-pydantic<< parameters.pydantic_version >>-urllib3<< parameters.urllib3_version >> + - run: tox -e py<< parameters.python_version >>-pydantic<< parameters.pydantic_version >>-requests<< parameters.requests_version >> pyright: docker: @@ -59,7 +59,7 @@ workflows: parameters: python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] pydantic_version: ["2.4"] - urllib3_version: ["2.1"] + requests_version: ["2.1"] - test: <<: *always-run name: pydantic-<< matrix.pydantic_version >> @@ -67,15 +67,15 @@ workflows: parameters: python_version: ["3.12"] pydantic_version: ["2.1.0", "2.1", "2.2", "2.3", "2.4", "2.5"] - urllib3_version: ["2.1"] + requests_version: ["2.1"] - test: <<: *always-run - name: urllib3-<< matrix.urllib3_version >> + name: requests-<< matrix.requests_version >> matrix: parameters: python_version: ["3.12"] pydantic_version: ["2.4"] - urllib3_version: ["1.26.5", "1.26", "2.0", "2.1"] + requests_version: ["2.0", "2.10", "2.20", "2.31"] - pyright: <<: *always-run - black: @@ -95,10 +95,10 @@ workflows: - pydantic-2.4 - pydantic-2.5 - - urllib3-1.26.5 - - urllib3-1.26 - - urllib3-2.0 - - urllib3-2.1 + - requests-2.0 + - requests-2.10 + - requests-2.20 + - requests-2.31 - pyright - black diff --git a/README.md b/README.md index 0662bf018..238b5f0f6 100644 --- a/README.md +++ b/README.md @@ -180,44 +180,24 @@ the [Pydantic error documentation](https://docs.pydantic.dev/latest/errors/error experience. See [Static Type Analysis](#static-types) below for more information. ### HTTP exceptions -When an HTTP error status is returned, a specific exception class is thrown. All HTTP error exception classes inherit from `ApiException`. +When an HTTP error status is returned, a `PalantirRPCException` is thrown. All HTTP error exception classes inherit from `ApiException`. ```python -from foundry import ApiException -from foundry import UnauthorizedException +from foundry import PalantirRPCException try: api_response = foundry_client.datasets.abort_transaction(dataset_rid, transaction_rid) ... -except UnauthorizedException: - print("You are not authorized to abort the transaction") -except ApiException as e: +except PalantirRPCException as e: print("Another HTTP exception occurred: " + str(e)) ``` -| Status Code | Exception | -| ----------- | --------------------- | -| 400 | BadRequestException | -| 401 | UnauthorizedException | -| 403 | ForbiddenException | -| 404 | NotFoundException | -| 500-599 | ServiceException | -| Other | ApiException | - -> The full list of different HTTP exceptions that might be thrown. - -Each exception will have the following properties. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors) for details about the Foundry error information. +This exception will have the following properties. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors) for details about the Foundry error information. | Property | Type | Description | | ----------------- | -----------------------| ------------------------------------------------------------------------------------------------------------------------------ | -| status | int | The HTTP status code | -| reason | Optional[str] | The HTTP response reason | -| body | Optional[str] | The HTTP response body | -| headers | urllib3.HTTPHeaderDict | The HTTP response headers | -| json | dict | The HTTP response body parsed as JSON | -| error_code | str | The Palantir error code. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | -| error_name | str | The Palantir error name. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | +| name | str | The Palantir error name. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | | error_instance_id | str | The Palantir error instance ID. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | | parameters | Dict[str, Any] | The Palantir error parameters. See the [Foundry API docs](https://www.palantir.com/docs/foundry/api/general/overview/errors). | diff --git a/foundry/_core/__init__.py b/foundry/_core/__init__.py index 2b4e3a13f..490e9ab88 100644 --- a/foundry/_core/__init__.py +++ b/foundry/_core/__init__.py @@ -11,4 +11,3 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - diff --git a/foundry/_core/auth_utils.py b/foundry/_core/auth_utils.py index 19e3796e0..9106a6f23 100644 --- a/foundry/_core/auth_utils.py +++ b/foundry/_core/auth_utils.py @@ -15,17 +15,17 @@ from abc import ABC, abstractmethod from typing import Callable, TypeVar -T = TypeVar('T') +T = TypeVar("T") -class Token(ABC): +class Token(ABC): @property @abstractmethod def access_token(self) -> str: pass -class Auth(ABC): +class Auth(ABC): @abstractmethod def get_token(self) -> "Token": pass diff --git a/foundry/_core/confidential_client_auth.py b/foundry/_core/confidential_client_auth.py index fd0e18d05..f77ae7fe1 100644 --- a/foundry/_core/confidential_client_auth.py +++ b/foundry/_core/confidential_client_auth.py @@ -25,7 +25,8 @@ from foundry._errors.not_authenticated import NotAuthenticated -T = TypeVar('T') +T = TypeVar("T") + class ConfidentialClientAuth(Auth): """ @@ -37,9 +38,19 @@ class ConfidentialClientAuth(Auth): :param scopes: The list of scopes to request. :param hostname: Hostname for authentication and ontology endpoints. """ - def __init__(self, client_id: str, client_secret: str, hostname: str, scopes: List[str], should_refresh: bool = False) -> None: + + def __init__( + self, + client_id: str, + client_secret: str, + hostname: str, + scopes: List[str], + should_refresh: bool = False, + ) -> None: if len(scopes) == 0: - raise ValueError("You have not provided any scopes. At least one scope must be provided.") + raise ValueError( + "You have not provided any scopes. At least one scope must be provided." + ) self._client_id = client_id self._client_secret = client_secret @@ -47,7 +58,9 @@ def __init__(self, client_id: str, client_secret: str, hostname: str, scopes: Li self._should_refresh = should_refresh self._refresh_task: Optional[asyncio.Task] = None self._hostname = hostname - self._server_oauth_flow_provider = ConfidentialClientOAuthFlowProvider(client_id, client_secret, self.url, scopes=scopes) + self._server_oauth_flow_provider = ConfidentialClientOAuthFlowProvider( + client_id, client_secret, self.url, scopes=scopes + ) def get_token(self) -> OAuthToken: if self._token is None: @@ -61,7 +74,6 @@ def execute_with_token(self, func: Callable[[OAuthToken], T]) -> T: self.sign_out() raise e - def run_with_token(self, func: Callable[[OAuthToken], T]) -> None: try: self._run_with_attempted_refresh(func) @@ -105,7 +117,9 @@ async def refresh_token_task(): if self._should_refresh: loop = asyncio.get_event_loop() self._refresh_task = loop.create_task(refresh_token_task()) - return SignInResponse(session={"accessToken": token.access_token, "expiresIn": token.expires_in}) + return SignInResponse( + session={"accessToken": token.access_token, "expiresIn": token.expires_in} + ) def sign_out(self) -> SignOutResponse: if self._refresh_task: diff --git a/foundry/_core/foundry_token_auth_client.py b/foundry/_core/foundry_token_auth_client.py index 4ae9f362c..3453ed0d0 100644 --- a/foundry/_core/foundry_token_auth_client.py +++ b/foundry/_core/foundry_token_auth_client.py @@ -24,8 +24,8 @@ T = TypeVar("T") -class _UserToken(Token): +class _UserToken(Token): def __init__(self, token: str) -> None: self._token = token diff --git a/foundry/_core/oauth.py b/foundry/_core/oauth.py index 752d8631f..92eebdebd 100644 --- a/foundry/_core/oauth.py +++ b/foundry/_core/oauth.py @@ -14,6 +14,7 @@ from pydantic import BaseModel + class SignInResponse(BaseModel): session: dict diff --git a/foundry/_core/palantir_session.py b/foundry/_core/palantir_session.py index 4695fbd8e..3caa66e3c 100644 --- a/foundry/_core/palantir_session.py +++ b/foundry/_core/palantir_session.py @@ -19,7 +19,9 @@ from foundry._core.auth_utils import Auth, Token -def _run_with_401_status_check(callable: Callable[[Token], requests.Response]) -> Callable[[Token], requests.Response]: +def _run_with_401_status_check( + callable: Callable[[Token], requests.Response] +) -> Callable[[Token], requests.Response]: def f(token: Token) -> requests.Response: response = callable(token) if response.status_code == 401: @@ -36,6 +38,7 @@ class PalantirSession: :param auth: Dependency that provides credentials for authentication. :param preview: Boolean that enables access to endpoints in Preview Mode by default. Defaults to False. """ + def __init__(self, auth: Auth, hostname: str, preview: bool = False) -> None: self._auth = auth self._hostname = hostname.removeprefix("https://").removeprefix("http://") @@ -45,7 +48,7 @@ def __init__(self, auth: Auth, hostname: str, preview: bool = False) -> None: @property def hostname(self) -> str: return self._remove_host_prefix(self._hostname) - + def request( self, method: str, @@ -78,7 +81,16 @@ def get( json: Optional[Any] = None, stream: bool = True, ) -> requests.Response: - request_fn = _run_with_401_status_check(lambda token: self._session.get(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + request_fn = _run_with_401_status_check( + lambda token: self._session.get( + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) return self._auth.execute_with_token(request_fn) def post( @@ -90,7 +102,16 @@ def post( json: Optional[Any] = None, stream: bool = True, ) -> requests.Response: - request_fn = _run_with_401_status_check(lambda token: self._session.post(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + request_fn = _run_with_401_status_check( + lambda token: self._session.post( + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) return self._auth.execute_with_token(request_fn) def put( @@ -102,7 +123,16 @@ def put( json: Optional[Any] = None, stream: bool = True, ) -> requests.Response: - request_fn = _run_with_401_status_check(lambda token: self._session.put(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + request_fn = _run_with_401_status_check( + lambda token: self._session.put( + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) return self._auth.execute_with_token(request_fn) def delete( @@ -114,7 +144,16 @@ def delete( json: Optional[Any] = None, stream: bool = True, ) -> requests.Response: - request_fn = _run_with_401_status_check(lambda token: self._session.delete(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + request_fn = _run_with_401_status_check( + lambda token: self._session.delete( + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) return self._auth.execute_with_token(request_fn) def patch( @@ -126,11 +165,21 @@ def patch( json: Optional[Any] = None, stream: bool = True, ) -> requests.Response: - request_fn = _run_with_401_status_check(lambda token: self._session.patch(url=url, params=params, data=data, json=json, headers=self._add_user_agent_and_auth_headers(token, headers), stream=stream)) + request_fn = _run_with_401_status_check( + lambda token: self._session.patch( + url=url, + params=params, + data=data, + json=json, + headers=self._add_user_agent_and_auth_headers(token, headers), + stream=stream, + ) + ) return self._auth.execute_with_token(request_fn) - - def _add_user_agent_and_auth_headers(self, token: Token, headers: Optional[Mapping[str, Any]] = None) -> Dict[str, str]: + def _add_user_agent_and_auth_headers( + self, token: Token, headers: Optional[Mapping[str, Any]] = None + ) -> Dict[str, str]: return { **(headers or {}), "Authorization": "Bearer " + token.access_token, diff --git a/foundry/_core/public_client_auth.py b/foundry/_core/public_client_auth.py index 8bcc95b45..7a890464f 100644 --- a/foundry/_core/public_client_auth.py +++ b/foundry/_core/public_client_auth.py @@ -26,7 +26,8 @@ import webbrowser -T = TypeVar('T') +T = TypeVar("T") + class PublicClientAuth(Auth): scopes: list[str] = ["api:read-data", "api:write-data", "offline_access"] @@ -39,7 +40,10 @@ class PublicClientAuth(Auth): :param client_secret: OAuth client secret to be used by the application. :param hostname: Hostname for authentication and ontology endpoints. """ - def __init__(self, client_id: str, redirect_url: str, hostname: str, should_refresh: bool = False) -> None: + + def __init__( + self, client_id: str, redirect_url: str, hostname: str, should_refresh: bool = False + ) -> None: self._client_id = client_id self._redirect_url = redirect_url @@ -47,10 +51,9 @@ def __init__(self, client_id: str, redirect_url: str, hostname: str, should_refr self._should_refresh = should_refresh self._stop_refresh_event = threading.Event() self._hostname = hostname - self._server_oauth_flow_provider = PublicClientOAuthFlowProvider(client_id=client_id, - redirect_url=redirect_url, - url=self.url, - scopes=self.scopes) + self._server_oauth_flow_provider = PublicClientOAuthFlowProvider( + client_id=client_id, redirect_url=redirect_url, url=self.url, scopes=self.scopes + ) self._auth_request: Optional[AuthorizeRequest] = None def get_token(self) -> OAuthToken: diff --git a/foundry/_errors/environment_not_configured.py b/foundry/_errors/environment_not_configured.py index c50f00433..f8ac1777c 100644 --- a/foundry/_errors/environment_not_configured.py +++ b/foundry/_errors/environment_not_configured.py @@ -12,5 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. + class EnvironmentNotConfigured(Exception): pass diff --git a/foundry/_errors/not_authenticated.py b/foundry/_errors/not_authenticated.py index 49f5fdaa4..188674d49 100644 --- a/foundry/_errors/not_authenticated.py +++ b/foundry/_errors/not_authenticated.py @@ -12,5 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. + class NotAuthenticated(Exception): pass diff --git a/foundry/_errors/palantir_rpc_exception.py b/foundry/_errors/palantir_rpc_exception.py index c8fb7df40..fff452083 100644 --- a/foundry/_errors/palantir_rpc_exception.py +++ b/foundry/_errors/palantir_rpc_exception.py @@ -15,6 +15,7 @@ from typing import Any, Dict from foundry._errors.helpers import format_error_message + class PalantirRPCException(Exception): def __init__(self, error_metadata: Dict[str, Any]): super().__init__(format_error_message(error_metadata)) diff --git a/foundry/_errors/sdk_internal_error.py b/foundry/_errors/sdk_internal_error.py index 2f5f84bf4..0101b1893 100644 --- a/foundry/_errors/sdk_internal_error.py +++ b/foundry/_errors/sdk_internal_error.py @@ -64,10 +64,10 @@ def __str__(self): f"SDK Version: {__version__}\n" f"OpenAPI Document Version: {__openapi_document_version__}\n" f"OpenAPI Specification Version: {__openapi_specification_version__}\n" - f"OpenAPI Generator Version: {__openapi_generator_version__}\n" - f"Pydantic Version: {__pydantic__version__}\n" - f"Pydantic Core Version: {__pydantic_core_version__}\n" - f"Requests Version: {__requests_version__}\n" + f"OpenAPI Generator Version: {__openapi_generator_version__}\n" + f"Pydantic Version: {__pydantic__version__}\n" + f"Pydantic Core Version: {__pydantic_core_version__}\n" + f"Requests Version: {__requests_version__}\n" ) return message diff --git a/foundry/api/__init__.py b/foundry/api/__init__.py index b78e6e4b0..4d4d04ad3 100644 --- a/foundry/api/__init__.py +++ b/foundry/api/__init__.py @@ -18,4 +18,3 @@ from foundry.api.datasets_api_service_api import DatasetsApiServiceApi from foundry.api.ontologies_api_service_api import OntologiesApiServiceApi from foundry.api.ontologies_v2_api_service_api import OntologiesV2ApiServiceApi - diff --git a/foundry/api/datasets_api_service_api.py b/foundry/api/datasets_api_service_api.py index c96a876ab..c1101fe63 100644 --- a/foundry/api/datasets_api_service_api.py +++ b/foundry/api/datasets_api_service_api.py @@ -71,20 +71,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def abort_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """abort_transaction - Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Aborts an open Transaction. File modifications made on this Transaction are not preserved and the Branch is not updated. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -96,11 +100,9 @@ def abort_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -111,35 +113,24 @@ def abort_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/abort", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -154,20 +145,24 @@ def abort_transaction( @handle_unexpected def commit_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """commit_transaction - Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Commits an open Transaction. File modifications made on this Transaction are preserved and the Branch is updated to point to the Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -179,11 +174,9 @@ def commit_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -194,35 +187,24 @@ def commit_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}/commit", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -237,20 +219,22 @@ def commit_transaction( @handle_unexpected def create_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to create the Branch." + ), + ], create_branch_request: CreateBranchRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Branch: """create_branch - Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a branch on an existing dataset. A branch may optionally point to a (committed) transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Branch. (required) :type dataset_rid: str @@ -262,11 +246,9 @@ def create_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -277,7 +259,7 @@ def create_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters # process the header parameters # process the form parameters @@ -285,37 +267,21 @@ def create_branch( if create_branch_request is not None: _body_params = create_branch_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Branch" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/branches', + method="POST", + resource_path="/v1/datasets/{datasetRid}/branches", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -334,15 +300,12 @@ def create_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Dataset: """create_dataset - Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a new Dataset. A default branch - `master` for most enrollments - will be created on the Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param create_dataset_request: (required) :type create_dataset_request: CreateDatasetRequest @@ -352,11 +315,9 @@ def create_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -373,37 +334,21 @@ def create_dataset( if create_dataset_request is not None: _body_params = create_dataset_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets', + method="POST", + resource_path="/v1/datasets", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -418,27 +363,34 @@ def create_dataset( @handle_unexpected def create_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to create the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to create the Transaction." + ), + ], create_transaction_request: CreateTransactionRequest, - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. " + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """create_transaction - Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Creates a Transaction on a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to create the Transaction. (required) :type dataset_rid: str :param create_transaction_request: (required) :type create_transaction_request: CreateTransactionRequest - :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. + :param branch_id: The identifier (name) of the Branch on which to create the Transaction. Defaults to `master` for most enrollments. :type branch_id: str :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -446,11 +398,9 @@ def create_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -461,49 +411,32 @@ def create_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + # process the header parameters # process the form parameters # process the body parameter if create_transaction_request is not None: _body_params = create_transaction_request - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/transactions', + method="POST", + resource_path="/v1/datasets/{datasetRid}/transactions", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -518,20 +451,22 @@ def create_transaction( @handle_unexpected def delete_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Branch." + ), + ], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_branch - Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes the Branch with the given BranchId. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -543,11 +478,9 @@ def delete_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -558,28 +491,21 @@ def delete_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if branch_id is not None: - _path_params['branchId'] = branch_id + _path_params["branchId"] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} return self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -594,22 +520,34 @@ def delete_branch( @handle_unexpected def delete_file( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to delete the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to delete the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments.")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to delete the File. Defaults to `master` for most enrollments." + ), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field( + description="The Resource Identifier (RID) of the open delete Transaction on which to delete the File." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_file - Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Deletes a File from a Dataset. By default the file is deleted in a new transaction on the default branch - `master` for most enrollments. The file will still be visible on historical views. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **delete a File from a specific Branch** specify the Branch's identifier as `branchId`. A new delete Transaction will be created and committed on this branch. To **delete a File using a manually opened Transaction**, specify the Transaction's resource identifier as `transactionRid`. The transaction must be of type `DELETE`. This is useful for deleting multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to delete the File. (required) :type dataset_rid: str @@ -625,11 +563,9 @@ def delete_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -640,36 +576,27 @@ def delete_file( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} return self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -684,28 +611,33 @@ def delete_file( @handle_unexpected def delete_schema( self, - dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to delete the schema. ")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The RID of the Transaction on which to delete the schema. ")] = None, + dataset_rid: Annotated[ + StrictStr, Field(description="The RID of the Dataset on which to delete the schema. ") + ], + branch_id: Annotated[ + Optional[StrictStr], + Field(description="The ID of the Branch on which to delete the schema. "), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The RID of the Transaction on which to delete the schema. "), + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """delete_schema - Deletes the Schema from a Dataset and Branch. + Deletes the Schema from a Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to delete the schema. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch on which to delete the schema. + :param branch_id: The ID of the Branch on which to delete the schema. :type branch_id: str - :param transaction_rid: The RID of the Transaction on which to delete the schema. + :param transaction_rid: The RID of the Transaction on which to delete the schema. :type transaction_rid: str :param preview: :type preview: bool @@ -715,11 +647,9 @@ def delete_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -730,38 +660,28 @@ def delete_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} return self._api_client.call_api( - method='DELETE', - resource_path='/v1/datasets/{datasetRid}/schema', + method="DELETE", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -776,20 +696,22 @@ def delete_schema( @handle_unexpected def get_branch( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Branch.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Branch." + ), + ], branch_id: Annotated[StrictStr, Field(description="The identifier (name) of the Branch.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Branch: """get_branch - Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Get a Branch of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Branch. (required) :type dataset_rid: str @@ -801,11 +723,9 @@ def get_branch( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -816,35 +736,24 @@ def get_branch( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if branch_id is not None: - _path_params['branchId'] = branch_id + _path_params["branchId"] = branch_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Branch" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Branch"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/branches/{branchId}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches/{branchId}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -863,15 +772,12 @@ def get_dataset( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Dataset: """get_dataset - Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the Dataset with the given DatasetRid. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: (required) :type dataset_rid: str @@ -881,11 +787,9 @@ def get_dataset( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -896,33 +800,22 @@ def get_dataset( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Dataset" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Dataset"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}', + method="GET", + resource_path="/v1/datasets/{datasetRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -937,23 +830,36 @@ def get_dataset( @handle_unexpected def get_file_content( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> bytearray: """get_file_content - Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets the content of a File contained in a Dataset. By default this retrieves the file's content from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's content from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's content from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's content from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve the content for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's content from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -971,11 +877,9 @@ def get_file_content( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -986,47 +890,33 @@ def get_file_content( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - '*/*' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}/content', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}/content", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1041,23 +931,36 @@ def get_file_content( @handle_unexpected def get_file_metadata( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch that contains the File. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> File: """get_file_metadata - Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets metadata about a File contained in a Dataset. By default this retrieves the file's metadata from the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **get a file's metadata from a specific Branch** specify the Branch's identifier as `branchId`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **get a file's metadata from the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **get a file's metadata from the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will retrieve metadata for the most recent version of the file since the `startTransactionRid` up to the `endTransactionRid`. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **get a file's metadata from a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the File. (required) :type dataset_rid: str @@ -1075,11 +978,9 @@ def get_file_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1090,47 +991,33 @@ def get_file_metadata( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if file_path is not None: - _path_params['filePath'] = file_path + _path_params["filePath"] = file_path # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "File" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "File"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files/{filePath}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files/{filePath}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1146,27 +1033,28 @@ def get_file_metadata( def get_schema( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch. ")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], Field(description="The ID of the Branch. ") + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], Field(description="The TransactionRid that contains the Schema. ") + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> object: """get_schema - Retrieves the Schema for a Dataset and Branch, if it exists. + Retrieves the Schema for a Dataset and Branch, if it exists. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str - :param branch_id: The ID of the Branch. + :param branch_id: The ID of the Branch. :type branch_id: str - :param transaction_rid: The TransactionRid that contains the Schema. + :param transaction_rid: The TransactionRid that contains the Schema. :type transaction_rid: str :param preview: :type preview: bool @@ -1176,11 +1064,9 @@ def get_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1191,46 +1077,31 @@ def get_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '204': None - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "object", "204": None} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/schema', + method="GET", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1245,20 +1116,24 @@ def get_schema( @handle_unexpected def get_transaction( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset that contains the Transaction.")], - transaction_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset that contains the Transaction." + ), + ], + transaction_rid: Annotated[ + StrictStr, Field(description="The Resource Identifier (RID) of the Transaction.") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Transaction: """get_transaction - Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Gets a Transaction of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset that contains the Transaction. (required) :type dataset_rid: str @@ -1270,11 +1145,9 @@ def get_transaction( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1285,35 +1158,24 @@ def get_transaction( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid if transaction_rid is not None: - _path_params['transactionRid'] = transaction_rid + _path_params["transactionRid"] = transaction_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "Transaction" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "Transaction"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/transactions/{transactionRid}', + method="GET", + resource_path="/v1/datasets/{datasetRid}/transactions/{transactionRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1328,25 +1190,32 @@ def get_transaction( @handle_unexpected def list_branches( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Branches.")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to list Branches." + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListBranchesResponse: """list_branches - Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists the Branches of a Dataset. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Branches. (required) :type dataset_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1356,11 +1225,9 @@ def list_branches( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1371,41 +1238,28 @@ def list_branches( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListBranchesResponse" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "ListBranchesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/branches', + method="GET", + resource_path="/v1/datasets/{datasetRid}/branches", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1420,24 +1274,42 @@ def list_branches( @handle_unexpected def list_files( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to list Files.")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to list Files." + ), + ], + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to list Files. Defaults to `master` for most enrollments." + ), + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListFilesResponse: """list_files - Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + Lists Files contained in a Dataset. By default files are listed on the latest view of the default branch - `master` for most enrollments. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **list files on a specific Branch** specify the Branch's identifier as `branchId`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction of the branch if there are no snapshot transactions. To **list files on the resolved view of a transaction** specify the Transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the latest snapshot transaction, or the earliest ancestor transaction if there are no snapshot transactions. To **list files on the resolved view of a range of transactions** specify the the start transaction's resource identifier as `startTransactionRid` and the end transaction's resource identifier as `endTransactionRid`. This will include the most recent version of all files since the `startTransactionRid` up to the `endTransactionRid`. Note that an intermediate snapshot transaction will remove all files from the view. Behavior is undefined when the start and end transactions do not belong to the same root-to-leaf path. To **list files on a specific transaction** specify the Transaction's resource identifier as both the `startTransactionRid` and `endTransactionRid`. This will include only files that were modified as part of that Transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to list Files. (required) :type dataset_rid: str @@ -1447,7 +1319,7 @@ def list_files( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 1,000. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1457,11 +1329,9 @@ def list_files( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1472,53 +1342,37 @@ def list_files( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListFilesResponse" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "ListFilesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/files', + method="GET", + resource_path="/v1/datasets/{datasetRid}/files", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1533,28 +1387,30 @@ def list_files( @handle_unexpected def put_schema( self, - dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ")], + dataset_rid: Annotated[ + StrictStr, Field(description="The RID of the Dataset on which to put the Schema. ") + ], body: Dict[str, Any], - branch_id: Annotated[Optional[StrictStr], Field(description="The ID of the Branch on which to put the Schema. ")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field(description="The ID of the Branch on which to put the Schema. "), + ] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> None: """put_schema - Puts a Schema on an existing Dataset and Branch. + Puts a Schema on an existing Dataset and Branch. :param dataset_rid: The RID of the Dataset on which to put the Schema. (required) :type dataset_rid: str :param body: (required) :type body: object - :param branch_id: The ID of the Branch on which to put the Schema. + :param branch_id: The ID of the Branch on which to put the Schema. :type branch_id: str :param preview: :type preview: bool @@ -1564,11 +1420,9 @@ def put_schema( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1579,46 +1433,32 @@ def put_schema( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter if body is not None: _body_params = body - - # set the HTTP header `Content-Type` - _default_content_type = ( - self._api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) + _default_content_type = self._api_client.select_header_content_type(["application/json"]) if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type + _header_params["Content-Type"] = _default_content_type # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - - } + _response_types_map: Dict[str, Optional[str]] = {} return self._api_client.call_api( - method='PUT', - resource_path='/v1/datasets/{datasetRid}/schema', + method="PUT", + resource_path="/v1/datasets/{datasetRid}/schema", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1634,25 +1474,47 @@ def put_schema( def read_table( self, dataset_rid: Annotated[StrictStr, Field(description="The RID of the Dataset. ")], - format: Annotated[TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ")], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch.")] = None, - start_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the start Transaction.")] = None, - end_transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the end Transaction.")] = None, - columns: Annotated[Optional[List[StrictStr]], Field(description="A subset of the dataset columns to include in the result. Defaults to all columns. ")] = None, - row_limit: Annotated[Optional[StrictInt], Field(description="A limit on the number of rows to return. Note that row ordering is non-deterministic. ")] = None, - preview: Annotated[Optional[StrictBool], Field(description="A boolean flag that, when set to true, enables the use of beta features in preview mode. ")] = None, + format: Annotated[ + TableExportFormat, Field(description="The export format. Must be `ARROW` or `CSV`. ") + ], + branch_id: Annotated[ + Optional[StrictStr], Field(description="The identifier (name) of the Branch.") + ] = None, + start_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the start Transaction."), + ] = None, + end_transaction_rid: Annotated[ + Optional[StrictStr], + Field(description="The Resource Identifier (RID) of the end Transaction."), + ] = None, + columns: Annotated[ + Optional[List[StrictStr]], + Field( + description="A subset of the dataset columns to include in the result. Defaults to all columns. " + ), + ] = None, + row_limit: Annotated[ + Optional[StrictInt], + Field( + description="A limit on the number of rows to return. Note that row ordering is non-deterministic. " + ), + ] = None, + preview: Annotated[ + Optional[StrictBool], + Field( + description="A boolean flag that, when set to true, enables the use of beta features in preview mode. " + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> bytearray: """read_table - :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. + :::callout{theme=warning title=Warning} This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add `preview=true` to the request query parameters. Furthermore, this endpoint currently does not support views (Virtual datasets composed of other datasets). ::: Gets the content of a dataset as a table in the specified format. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-read`. :param dataset_rid: The RID of the Dataset. (required) :type dataset_rid: str @@ -1664,11 +1526,11 @@ def read_table( :type start_transaction_rid: str :param end_transaction_rid: The Resource Identifier (RID) of the end Transaction. :type end_transaction_rid: str - :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. + :param columns: A subset of the dataset columns to include in the result. Defaults to all columns. :type columns: List[str] - :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. + :param row_limit: A limit on the number of rows to return. Note that row ordering is non-deterministic. :type row_limit: int - :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. + :param preview: A boolean flag that, when set to true, enables the use of beta features in preview mode. :type preview: bool :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -1676,11 +1538,10 @@ def read_table( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 _collection_formats: Dict[str, str] = { - - 'columns': 'multi', + "columns": "multi", } _path_params: Dict[str, str] = {} @@ -1692,61 +1553,43 @@ def read_table( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if start_transaction_rid is not None: - - _query_params.append(('startTransactionRid', start_transaction_rid)) - + _query_params.append(("startTransactionRid", start_transaction_rid)) + if end_transaction_rid is not None: - - _query_params.append(('endTransactionRid', end_transaction_rid)) - + _query_params.append(("endTransactionRid", end_transaction_rid)) + if format is not None: - - _query_params.append(('format', format.value)) - + _query_params.append(("format", format.value)) + if columns is not None: - - _query_params.append(('columns', columns)) - + _query_params.append(("columns", columns)) + if row_limit is not None: - - _query_params.append(('rowLimit', row_limit)) - + _query_params.append(("rowLimit", row_limit)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - '*/*' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["*/*"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytearray" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "bytearray"} return self._api_client.call_api( - method='GET', - resource_path='/v1/datasets/{datasetRid}/readTable', + method="GET", + resource_path="/v1/datasets/{datasetRid}/readTable", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1761,24 +1604,41 @@ def read_table( @handle_unexpected def upload_file( self, - dataset_rid: Annotated[StrictStr, Field(description="The Resource Identifier (RID) of the Dataset on which to upload the File.")], + dataset_rid: Annotated[ + StrictStr, + Field( + description="The Resource Identifier (RID) of the Dataset on which to upload the File." + ), + ], file_path: Annotated[StrictStr, Field(description="The File's path within the Dataset.")], body: Union[StrictBytes, StrictStr], - branch_id: Annotated[Optional[StrictStr], Field(description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments.")] = None, - transaction_type: Annotated[Optional[TransactionType], Field(description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`.")] = None, - transaction_rid: Annotated[Optional[StrictStr], Field(description="The Resource Identifier (RID) of the open Transaction on which to upload the File.")] = None, + branch_id: Annotated[ + Optional[StrictStr], + Field( + description="The identifier (name) of the Branch on which to upload the File. Defaults to `master` for most enrollments." + ), + ] = None, + transaction_type: Annotated[ + Optional[TransactionType], + Field( + description="The type of the Transaction to create when using branchId. Defaults to `UPDATE`." + ), + ] = None, + transaction_rid: Annotated[ + Optional[StrictStr], + Field( + description="The Resource Identifier (RID) of the open Transaction on which to upload the File." + ), + ] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> File: """upload_file - Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. + Uploads a File to an existing Dataset. The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`. By default the file is uploaded to a new transaction on the default branch - `master` for most enrollments. If the file already exists only the most recent version will be visible in the updated view. #### Advanced Usage See [Datasets Core Concepts](/docs/foundry/data-integration/datasets/) for details on using branches and transactions. To **upload a file to a specific Branch** specify the Branch's identifier as `branchId`. A new transaction will be created and committed on this branch. By default the TransactionType will be `UPDATE`, to override this default specify `transactionType` in addition to `branchId`. See [createBranch](/docs/foundry/api/datasets-resources/branches/create-branch/) to create a custom branch. To **upload a file on a manually opened transaction** specify the Transaction's resource identifier as `transactionRid`. This is useful for uploading multiple files in a single transaction. See [createTransaction](/docs/foundry/api/datasets-resources/transactions/create-transaction/) to open a transaction. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:datasets-write`. :param dataset_rid: The Resource Identifier (RID) of the Dataset on which to upload the File. (required) :type dataset_rid: str @@ -1798,11 +1658,9 @@ def upload_file( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1813,24 +1671,20 @@ def upload_file( # process the path parameters if dataset_rid is not None: - _path_params['datasetRid'] = dataset_rid + _path_params["datasetRid"] = dataset_rid # process the query parameters if file_path is not None: - - _query_params.append(('filePath', file_path)) - + _query_params.append(("filePath", file_path)) + if branch_id is not None: - - _query_params.append(('branchId', branch_id)) - + _query_params.append(("branchId", branch_id)) + if transaction_type is not None: - - _query_params.append(('transactionType', transaction_type.value)) - + _query_params.append(("transactionType", transaction_type.value)) + if transaction_rid is not None: - - _query_params.append(('transactionRid', transaction_rid)) - + _query_params.append(("transactionRid", transaction_rid)) + # process the header parameters # process the form parameters # process the body parameter @@ -1842,27 +1696,16 @@ def upload_file( else: _body_params = body - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] + _auth_settings: List[str] = ["BearerAuth"] - _response_types_map: Dict[str, Optional[str]] = { - '200': "File" - - } + _response_types_map: Dict[str, Optional[str]] = {"200": "File"} return self._api_client.call_api( - method='POST', - resource_path='/v1/datasets/{datasetRid}/files:upload', + method="POST", + resource_path="/v1/datasets/{datasetRid}/files:upload", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/foundry/api/ontologies_api_service_api.py b/foundry/api/ontologies_api_service_api.py index ad1e172cf..f3fefd7f7 100644 --- a/foundry/api/ontologies_api_service_api.py +++ b/foundry/api/ontologies_api_service_api.py @@ -70,20 +70,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action type. ")], - action_type_api_name: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the action type. " + ), + ], + action_type_api_name: Annotated[ + StrictStr, Field(description="The name of the action type in the API. ") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ActionType: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action type. (required) :type ontology_rid: str @@ -95,11 +99,9 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -110,35 +112,24 @@ def get_action_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if action_type_api_name is not None: - _path_params['actionTypeApiName'] = action_type_api_name + _path_params["actionTypeApiName"] = action_type_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ActionType"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes/{actionTypeApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -153,20 +144,27 @@ def get_action_type( @handle_unexpected def get_object_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ObjectType: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -178,11 +176,9 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -193,35 +189,24 @@ def get_object_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectType"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -236,19 +221,21 @@ def get_object_type( @handle_unexpected def get_ontology( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> Ontology: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -258,11 +245,9 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -273,33 +258,22 @@ def get_ontology( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Ontology" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "Ontology"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -314,21 +288,33 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + link_type: Annotated[ + StrictStr, + Field( + description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> LinkTypeSide: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -342,11 +328,9 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -357,37 +341,26 @@ def get_outgoing_link_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type if link_type is not None: - _path_params['linkType'] = link_type + _path_params["linkType"] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LinkTypeSide" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSide"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -402,21 +375,28 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + query_api_name: Annotated[ + StrictStr, + Field( + description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " + ), + ], preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> QueryType: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str @@ -430,11 +410,9 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -445,39 +423,27 @@ def get_query_type( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if query_api_name is not None: - _path_params['queryApiName'] = query_api_name + _path_params["queryApiName"] = query_api_name # process the query parameters if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryType" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "QueryType"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes/{queryApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -492,25 +458,32 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListActionTypesResponse: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the action types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -520,11 +493,9 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -535,41 +506,28 @@ def list_action_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListActionTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/actionTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/actionTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -584,25 +542,32 @@ def list_action_types( @handle_unexpected def list_object_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListObjectTypesResponse: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -612,11 +577,9 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -627,41 +590,28 @@ def list_object_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListObjectTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -679,15 +629,12 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOntologiesResponse: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -695,11 +642,9 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -714,27 +659,16 @@ def list_ontologies( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOntologiesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies', + method="GET", + resource_path="/v1/ontologies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -749,22 +683,31 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], Field(description="The desired size of the page to be returned.") + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOutgoingLinkTypesResponse: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the object type. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager** application. (required) :type ontology_rid: str @@ -780,11 +723,9 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -795,43 +736,30 @@ def list_outgoing_link_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOutgoingLinkTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/objectTypes/{objectType}/outgoingLinkTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -846,26 +774,33 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology_rid: Annotated[StrictStr, Field(description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology_rid: Annotated[ + StrictStr, + Field( + description="The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, preview: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListQueryTypesResponse: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology_rid: The unique Resource Identifier (RID) of the Ontology that contains the query types. To look up your Ontology RID, please use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology_rid: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -877,11 +812,9 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -892,45 +825,31 @@ def list_query_types( # process the path parameters if ontology_rid is not None: - _path_params['ontologyRid'] = ontology_rid + _path_params["ontologyRid"] = ontology_rid # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + if preview is not None: - - _query_params.append(('preview', preview)) - + _query_params.append(("preview", preview)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListQueryTypesResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v1/ontologies/{ontologyRid}/queryTypes', + method="GET", + resource_path="/v1/ontologies/{ontologyRid}/queryTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/foundry/api/ontologies_v2_api_service_api.py b/foundry/api/ontologies_v2_api_service_api.py index b3d3832d6..0991bc1b9 100644 --- a/foundry/api/ontologies_v2_api_service_api.py +++ b/foundry/api/ontologies_v2_api_service_api.py @@ -73,20 +73,24 @@ def __init__(self, api_client: ApiClient) -> None: @handle_unexpected def get_action_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - action_type: Annotated[StrictStr, Field(description="The name of the action type in the API. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + action_type: Annotated[ + StrictStr, Field(description="The name of the action type in the API. ") + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ActionTypeV2: """get_action_type - Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific action type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -98,11 +102,9 @@ def get_action_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -113,35 +115,24 @@ def get_action_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if action_type is not None: - _path_params['actionType'] = action_type + _path_params["actionType"] = action_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ActionTypeV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/actionTypes/{actionType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes/{actionType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -156,20 +147,27 @@ def get_action_type( @handle_unexpected def get_deployment( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - deployment: Annotated[StrictStr, Field(description="The API name of the deployment you want to fetch information about. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + deployment: Annotated[ + StrictStr, + Field( + description="The API name of the deployment you want to fetch information about. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> DeploymentMetadata: """get_deployment - Fetches information about a model deployment within a given Ontology. + Fetches information about a model deployment within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -181,11 +179,9 @@ def get_deployment( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -196,35 +192,24 @@ def get_deployment( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if deployment is not None: - _path_params['deployment'] = deployment + _path_params["deployment"] = deployment # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DeploymentMetadata" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "DeploymentMetadata"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/models/deployments/{deployment}', + method="GET", + resource_path="/v2/ontologies/{ontology}/models/deployments/{deployment}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -239,20 +224,27 @@ def get_deployment( @handle_unexpected def get_object_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ObjectTypeV2: """get_object_type - Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific object type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -264,11 +256,9 @@ def get_object_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -279,35 +269,24 @@ def get_object_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ObjectTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ObjectTypeV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -322,19 +301,21 @@ def get_object_type( @handle_unexpected def get_ontology_full_metadata( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> OntologyFullMetadata: """get_ontology_full_metadata - Get the full Ontology metadata. This includes the objects, links, actions, and queries. + Get the full Ontology metadata. This includes the objects, links, actions, and queries. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -344,11 +325,9 @@ def get_ontology_full_metadata( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -359,33 +338,22 @@ def get_ontology_full_metadata( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OntologyFullMetadata" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyFullMetadata"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/fullMetadata', + method="GET", + resource_path="/v2/ontologies/{ontology}/fullMetadata", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -400,19 +368,21 @@ def get_ontology_full_metadata( @handle_unexpected def get_ontology( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> OntologyV2: """get_ontology - Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific ontology with the given Ontology RID. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -422,11 +392,9 @@ def get_ontology( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -437,33 +405,22 @@ def get_ontology( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OntologyV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "OntologyV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}', + method="GET", + resource_path="/v2/ontologies/{ontology}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -478,21 +435,33 @@ def get_ontology( @handle_unexpected def get_outgoing_link_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - link_type: Annotated[StrictStr, Field(description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + link_type: Annotated[ + StrictStr, + Field( + description="The API name of the outgoing link. To find the API name for your link type, check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> LinkTypeSideV2: """get_outgoing_link_type - Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + Get an outgoing link for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -506,11 +475,9 @@ def get_outgoing_link_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -521,37 +488,26 @@ def get_outgoing_link_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type if link_type is not None: - _path_params['linkType'] = link_type + _path_params["linkType"] = link_type # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LinkTypeSideV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "LinkTypeSideV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes/{linkType}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -566,20 +522,27 @@ def get_outgoing_link_type( @handle_unexpected def get_query_type( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - query_api_name: Annotated[StrictStr, Field(description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + query_api_name: Annotated[ + StrictStr, + Field( + description="The API name of the query type. To find the API name, use the **List query types** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> QueryTypeV2: """get_query_type - Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Gets a specific query type with the given API name. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -591,11 +554,9 @@ def get_query_type( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -606,35 +567,24 @@ def get_query_type( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if query_api_name is not None: - _path_params['queryApiName'] = query_api_name + _path_params["queryApiName"] = query_api_name # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "QueryTypeV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "QueryTypeV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/queryTypes/{queryApiName}', + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes/{queryApiName}", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -649,25 +599,32 @@ def get_query_type( @handle_unexpected def list_action_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListActionTypesResponseV2: """list_action_types - Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the action types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -677,11 +634,9 @@ def list_action_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -692,41 +647,28 @@ def list_action_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListActionTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListActionTypesResponseV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/actionTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/actionTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -741,19 +683,21 @@ def list_action_types( @handle_unexpected def list_deployments( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListDeploymentsResponse: """list_deployments - Fetches a list of the available model deployments within a given Ontology. + Fetches a list of the available model deployments within a given Ontology. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -763,11 +707,9 @@ def list_deployments( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -778,33 +720,22 @@ def list_deployments( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListDeploymentsResponse" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListDeploymentsResponse"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/models/deployments', + method="GET", + resource_path="/v2/ontologies/{ontology}/models/deployments", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -819,25 +750,32 @@ def list_deployments( @handle_unexpected def list_object_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListObjectTypesV2Response: """list_object_types - Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the object types for the given Ontology. Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 500. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -847,11 +785,9 @@ def list_object_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -862,41 +798,28 @@ def list_object_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListObjectTypesV2Response" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListObjectTypesV2Response"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -914,15 +837,12 @@ def list_ontologies( _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOntologiesV2Response: """list_ontologies - Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the Ontologies visible to the current user. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param _request_timeout: timeout setting for this request in seconds. If one number provided, it will be total request @@ -930,11 +850,9 @@ def list_ontologies( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -949,27 +867,16 @@ def list_ontologies( # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOntologiesV2Response" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOntologiesV2Response"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies', + method="GET", + resource_path="/v2/ontologies", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -984,22 +891,31 @@ def list_ontologies( @handle_unexpected def list_outgoing_link_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - object_type: Annotated[StrictStr, Field(description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned.")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + object_type: Annotated[ + StrictStr, + Field( + description="The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager** application. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], Field(description="The desired size of the page to be returned.") + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListOutgoingLinkTypesResponseV2: """list_outgoing_link_types - List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. + List the outgoing links for an object type. Third-party applications using this endpoint via OAuth2 must request the following operation scopes: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str @@ -1015,11 +931,9 @@ def list_outgoing_link_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1030,43 +944,30 @@ def list_outgoing_link_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology if object_type is not None: - _path_params['objectType'] = object_type + _path_params["objectType"] = object_type # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListOutgoingLinkTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListOutgoingLinkTypesResponseV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/objectTypes/{objectType}/outgoingLinkTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1081,25 +982,32 @@ def list_outgoing_link_types( @handle_unexpected def list_query_types( self, - ontology: Annotated[StrictStr, Field(description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. ")], - page_size: Annotated[Optional[StrictInt], Field(description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. ")] = None, + ontology: Annotated[ + StrictStr, + Field( + description="The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. " + ), + ], + page_size: Annotated[ + Optional[StrictInt], + Field( + description="The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. " + ), + ] = None, page_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], ] = None, ) -> ListQueryTypesResponseV2: """list_query_types - Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. + Lists the query types for the given Ontology. Each page may be smaller than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response. Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:read-data`. :param ontology: The API name of the ontology. To find the API name, use the **List ontologies** endpoint or check the **Ontology Manager**. (required) :type ontology: str - :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. + :param page_size: The desired size of the page to be returned. Defaults to 100. See [page sizes](/docs/foundry/api/general/overview/paging/#page-sizes) for details. :type page_size: int :param page_token: :type page_token: str @@ -1109,11 +1017,9 @@ def list_query_types( (connection, read) timeouts. :type _request_timeout: int, tuple(int, int), optional :return: Returns the result object. - """ # noqa: E501 + """ # noqa: E501 - _collection_formats: Dict[str, str] = { - - } + _collection_formats: Dict[str, str] = {} _path_params: Dict[str, str] = {} _query_params: List[Tuple[str, Any]] = [] @@ -1124,41 +1030,28 @@ def list_query_types( # process the path parameters if ontology is not None: - _path_params['ontology'] = ontology + _path_params["ontology"] = ontology # process the query parameters if page_size is not None: - - _query_params.append(('pageSize', page_size)) - + _query_params.append(("pageSize", page_size)) + if page_token is not None: - - _query_params.append(('pageToken', page_token)) - + _query_params.append(("pageToken", page_token)) + # process the header parameters # process the form parameters # process the body parameter - # set the HTTP header `Accept` - _header_params['Accept'] = self._api_client.select_header_accept( - [ - 'application/json' - ] - ) - + _header_params["Accept"] = self._api_client.select_header_accept(["application/json"]) # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListQueryTypesResponseV2" - - } + _auth_settings: List[str] = ["BearerAuth"] + + _response_types_map: Dict[str, Optional[str]] = {"200": "ListQueryTypesResponseV2"} return self._api_client.call_api( - method='GET', - resource_path='/v2/ontologies/{ontology}/queryTypes', + method="GET", + resource_path="/v2/ontologies/{ontology}/queryTypes", path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/foundry/models/action_parameter_type.py b/foundry/models/action_parameter_type.py index d3047d036..4382384ba 100644 --- a/foundry/models/action_parameter_type.py +++ b/foundry/models/action_parameter_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -57,17 +58,13 @@ class ActionParameterArrayType(BaseModel): """ ActionParameterArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ActionParameterType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -95,13 +92,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -113,14 +109,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ActionParameterArrayType.model_rebuild(raise_errors=False) @@ -128,9 +125,22 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Action parameters. """ -ActionParameterType = Annotated[Union[ActionParameterArrayType, AttachmentType, BooleanType, DateType, DoubleType, IntegerType, LongType, OntologyObjectSetType, OntologyObjectType, StringType, TimestampType], Field(discriminator="type")] - - +ActionParameterType = Annotated[ + Union[ + ActionParameterArrayType, + AttachmentType, + BooleanType, + DateType, + DoubleType, + IntegerType, + LongType, + OntologyObjectSetType, + OntologyObjectType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/action_parameter_v2.py b/foundry/models/action_parameter_v2.py index fd2e2b039..a8cf43560 100644 --- a/foundry/models/action_parameter_v2.py +++ b/foundry/models/action_parameter_v2.py @@ -38,21 +38,18 @@ from foundry.models.action_parameter_type import ActionParameterType from typing_extensions import Self + class ActionParameterV2(BaseModel): """ Details about a parameter of an action. - """ # noqa: E501 + """ # noqa: E501 + data_type: ActionParameterType = Field(alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("dataType", "description", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +77,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -98,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type.py b/foundry/models/action_type.py index 2dea4d907..1a2ae8b78 100644 --- a/foundry/models/action_type.py +++ b/foundry/models/action_type.py @@ -40,25 +40,31 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ActionType(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") + rid: StrictStr = Field( + description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -96,14 +101,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict['operations'] = _items + _dict["operations"] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -115,12 +120,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/action_type_v2.py b/foundry/models/action_type_v2.py index 89dc9d56b..e3aa44e3e 100644 --- a/foundry/models/action_type_v2.py +++ b/foundry/models/action_type_v2.py @@ -40,25 +40,31 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ActionTypeV2(BaseModel): """ Represents an action type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the action type in the API. To find the API name for your Action Type, use the `List action types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) operations: Optional[List[LogicRule]] = None parameters: Optional[Dict[str, ActionParameterV2]] = None - rid: StrictStr = Field(description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. ") + rid: StrictStr = Field( + description="The unique resource identifier of an action type, useful for interacting with other Foundry APIs. " + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "operations", "parameters", "rid", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "operations", "parameters", "rid", "status") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -86,8 +92,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in operations (list) @@ -96,14 +101,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.operations: if _item: _items.append(_item.to_dict()) - _dict['operations'] = _items + _dict["operations"] = _items # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -115,12 +120,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/any_type.py b/foundry/models/any_type.py index 10570a86e..ce427655c 100644 --- a/foundry/models/any_type.py +++ b/foundry/models/any_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class AnyType(BaseModel): """ AnyType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["any"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/attachment_type.py b/foundry/models/attachment_type.py index a04411be2..cbbc0ae12 100644 --- a/foundry/models/attachment_type.py +++ b/foundry/models/attachment_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class AttachmentType(BaseModel): """ AttachmentType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["attachment"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/binary_type.py b/foundry/models/binary_type.py index 5a37e1fbb..d888061ee 100644 --- a/foundry/models/binary_type.py +++ b/foundry/models/binary_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class BinaryType(BaseModel): """ BinaryType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["binary"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/boolean_type.py b/foundry/models/boolean_type.py index 75696aa62..dd8f859e1 100644 --- a/foundry/models/boolean_type.py +++ b/foundry/models/boolean_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class BooleanType(BaseModel): """ BooleanType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["boolean"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/branch.py b/foundry/models/branch.py index d41fcc346..0f9602f90 100644 --- a/foundry/models/branch.py +++ b/foundry/models/branch.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class Branch(BaseModel): """ - A Branch of a Dataset. - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + A Branch of a Dataset. + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/byte_type.py b/foundry/models/byte_type.py index cec878ca5..badc2ce42 100644 --- a/foundry/models/byte_type.py +++ b/foundry/models/byte_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class ByteType(BaseModel): """ ByteType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["byte"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_branch_request.py b/foundry/models/create_branch_request.py index 52b191af8..6f7623934 100644 --- a/foundry/models/create_branch_request.py +++ b/foundry/models/create_branch_request.py @@ -37,20 +37,23 @@ from pydantic import Field from typing_extensions import Self + class CreateBranchRequest(BaseModel): """ CreateBranchRequest - """ # noqa: E501 - branch_id: StrictStr = Field(description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId") - transaction_rid: Optional[StrictStr] = Field(default=None, description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + """ # noqa: E501 + + branch_id: StrictStr = Field( + description="The identifier (name) of a Branch. Example: `master`. ", alias="branchId" + ) + transaction_rid: Optional[StrictStr] = Field( + default=None, + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) __properties: ClassVar[Set[str]] = set(("branchId", "transactionRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_dataset_request.py b/foundry/models/create_dataset_request.py index d3cf06cf4..0bf237dba 100644 --- a/foundry/models/create_dataset_request.py +++ b/foundry/models/create_dataset_request.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class CreateDatasetRequest(BaseModel): """ CreateDatasetRequest - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_link_rule.py b/foundry/models/create_link_rule.py index 1f9a47132..fd8a583bc 100644 --- a/foundry/models/create_link_rule.py +++ b/foundry/models/create_link_rule.py @@ -37,23 +37,40 @@ from pydantic import Field from typing_extensions import Self + class CreateLinkRule(BaseModel): """ CreateLinkRule - """ # noqa: E501 - a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") - b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") - link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") - link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") + """ # noqa: E501 + + a_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="aSideObjectTypeApiName", + ) + b_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="bSideObjectTypeApiName", + ) + link_type_api_name_ato_b: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameAtoB", + ) + link_type_api_name_bto_a: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameBtoA", + ) type: Literal["createLink"] - __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "aSideObjectTypeApiName", + "bSideObjectTypeApiName", + "linkTypeApiNameAtoB", + "linkTypeApiNameBtoA", + "type", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,8 +98,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -96,12 +112,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_object_rule.py b/foundry/models/create_object_rule.py index e8a7d0d60..c919864c2 100644 --- a/foundry/models/create_object_rule.py +++ b/foundry/models/create_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class CreateObjectRule(BaseModel): """ CreateObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["createObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/create_transaction_request.py b/foundry/models/create_transaction_request.py index 26017acdd..0cc10b315 100644 --- a/foundry/models/create_transaction_request.py +++ b/foundry/models/create_transaction_request.py @@ -38,19 +38,16 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self + class CreateTransactionRequest(BaseModel): """ CreateTransactionRequest - """ # noqa: E501 + """ # noqa: E501 + transaction_type: Optional[TransactionType] = Field(default=None, alias="transactionType") __properties: ClassVar[Set[str]] = set(("transactionType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/dataset.py b/foundry/models/dataset.py index 288d147f1..c1dcdc38a 100644 --- a/foundry/models/dataset.py +++ b/foundry/models/dataset.py @@ -37,21 +37,20 @@ from pydantic import Field from typing_extensions import Self + class Dataset(BaseModel): """ Dataset - """ # noqa: E501 + """ # noqa: E501 + name: StrictStr parent_folder_rid: StrictStr = Field(alias="parentFolderRid") - rid: StrictStr = Field(description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. ") + rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Dataset. Example: `ri.foundry.main.dataset.c26f11c8-cdb3-4f44-9f5d-9816ea1c82da`. " + ) __properties: ClassVar[Set[str]] = set(("name", "parentFolderRid", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/date_type.py b/foundry/models/date_type.py index e8abd589e..1bbdd31db 100644 --- a/foundry/models/date_type.py +++ b/foundry/models/date_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class DateType(BaseModel): """ DateType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["date"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/decimal_type.py b/foundry/models/decimal_type.py index d8f60d6b4..34aae5518 100644 --- a/foundry/models/decimal_type.py +++ b/foundry/models/decimal_type.py @@ -36,21 +36,18 @@ from pydantic import BaseModel, StrictInt, StrictStr from typing_extensions import Self + class DecimalType(BaseModel): """ DecimalType - """ # noqa: E501 + """ # noqa: E501 + precision: Optional[StrictInt] = None scale: Optional[StrictInt] = None type: Literal["decimal"] __properties: ClassVar[Set[str]] = set(("precision", "scale", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_link_rule.py b/foundry/models/delete_link_rule.py index f0e9c0e93..6aec5cbd3 100644 --- a/foundry/models/delete_link_rule.py +++ b/foundry/models/delete_link_rule.py @@ -37,23 +37,40 @@ from pydantic import Field from typing_extensions import Self + class DeleteLinkRule(BaseModel): """ DeleteLinkRule - """ # noqa: E501 - a_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="aSideObjectTypeApiName") - b_side_object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="bSideObjectTypeApiName") - link_type_api_name_ato_b: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameAtoB") - link_type_api_name_bto_a: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="linkTypeApiNameBtoA") + """ # noqa: E501 + + a_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="aSideObjectTypeApiName", + ) + b_side_object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="bSideObjectTypeApiName", + ) + link_type_api_name_ato_b: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameAtoB", + ) + link_type_api_name_bto_a: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="linkTypeApiNameBtoA", + ) type: Literal["deleteLink"] - __properties: ClassVar[Set[str]] = set(("aSideObjectTypeApiName", "bSideObjectTypeApiName", "linkTypeApiNameAtoB", "linkTypeApiNameBtoA", "type")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "aSideObjectTypeApiName", + "bSideObjectTypeApiName", + "linkTypeApiNameAtoB", + "linkTypeApiNameBtoA", + "type", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,8 +98,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -96,12 +112,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/delete_object_rule.py b/foundry/models/delete_object_rule.py index f5cb7d5c6..fe26fc3ad 100644 --- a/foundry/models/delete_object_rule.py +++ b/foundry/models/delete_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class DeleteObjectRule(BaseModel): """ DeleteObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["deleteObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_api.py b/foundry/models/deployment_api.py index b055aa824..776d26b5f 100644 --- a/foundry/models/deployment_api.py +++ b/foundry/models/deployment_api.py @@ -37,19 +37,16 @@ from foundry.models.deployment_transform_api import DeploymentTransformApi from typing_extensions import Self + class DeploymentApi(BaseModel): """ DeploymentApi - """ # noqa: E501 + """ # noqa: E501 + transform: Optional[DeploymentTransformApi] = None __properties: ClassVar[Set[str]] = set(("transform")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,13 +74,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of transform if self.transform: - _dict['transform'] = self.transform.to_dict() + _dict["transform"] = self.transform.to_dict() return _dict @classmethod @@ -95,12 +91,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_listing.py b/foundry/models/deployment_listing.py index 5ab91945d..0b9104f0f 100644 --- a/foundry/models/deployment_listing.py +++ b/foundry/models/deployment_listing.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class DeploymentListing(BaseModel): """ - Name and description associated with a model deployment. - """ # noqa: E501 + Name and description associated with a model deployment. + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") + description: Optional[StrictStr] = Field( + default=None, + description="A description or explanation of what this model deployment does and is intended to be used for. ", + ) __properties: ClassVar[Set[str]] = set(("apiName", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_metadata.py b/foundry/models/deployment_metadata.py index e44bf62a6..fd9aa9f5b 100644 --- a/foundry/models/deployment_metadata.py +++ b/foundry/models/deployment_metadata.py @@ -38,21 +38,21 @@ from foundry.models.deployment_api import DeploymentApi from typing_extensions import Self + class DeploymentMetadata(BaseModel): """ - Metadata related to a model deployment. - """ # noqa: E501 + Metadata related to a model deployment. + """ # noqa: E501 + api: DeploymentApi api_name: StrictStr = Field(alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="A description or explanation of what this model deployment does and is intended to be used for. ") + description: Optional[StrictStr] = Field( + default=None, + description="A description or explanation of what this model deployment does and is intended to be used for. ", + ) __properties: ClassVar[Set[str]] = set(("api", "apiName", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +80,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of api if self.api: - _dict['api'] = self.api.to_dict() + _dict["api"] = self.api.to_dict() return _dict @classmethod @@ -98,12 +97,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/deployment_transform_api.py b/foundry/models/deployment_transform_api.py index 120aa6c4a..513847265 100644 --- a/foundry/models/deployment_transform_api.py +++ b/foundry/models/deployment_transform_api.py @@ -37,20 +37,17 @@ from foundry.models.model_api_data_type import ModelApiDataType from typing_extensions import Self + class DeploymentTransformApi(BaseModel): """ DeploymentTransformApi - """ # noqa: E501 + """ # noqa: E501 + inputs: Optional[List[ModelApiDataType]] = None outputs: Optional[List[ModelApiDataType]] = None __properties: ClassVar[Set[str]] = set(("inputs", "outputs")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in inputs (list) @@ -88,14 +84,14 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.inputs: if _item: _items.append(_item.to_dict()) - _dict['inputs'] = _items + _dict["inputs"] = _items # override the default output from pydantic by calling `to_dict()` of each item in outputs (list) _items = [] if self.outputs: for _item in self.outputs: if _item: _items.append(_item.to_dict()) - _dict['outputs'] = _items + _dict["outputs"] = _items return _dict @classmethod @@ -107,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/double_type.py b/foundry/models/double_type.py index 4587f19a0..e21985eea 100644 --- a/foundry/models/double_type.py +++ b/foundry/models/double_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class DoubleType(BaseModel): """ DoubleType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["double"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/file.py b/foundry/models/file.py index c0cd32d99..916489615 100644 --- a/foundry/models/file.py +++ b/foundry/models/file.py @@ -37,22 +37,24 @@ from pydantic import Field from typing_extensions import Self + class File(BaseModel): """ File - """ # noqa: E501 - path: StrictStr = Field(description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. ") + """ # noqa: E501 + + path: StrictStr = Field( + description="The path to a File within Foundry. Examples: `my-file.txt`, `path/to/my-file.jpg`, `dataframe.snappy.parquet`. " + ) size_bytes: Optional[StrictStr] = Field(default=None, alias="sizeBytes") - transaction_rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", alias="transactionRid") + transaction_rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ", + alias="transactionRid", + ) updated_time: datetime = Field(alias="updatedTime") __properties: ClassVar[Set[str]] = set(("path", "sizeBytes", "transactionRid", "updatedTime")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/float_type.py b/foundry/models/float_type.py index adf518340..3313f6848 100644 --- a/foundry/models/float_type.py +++ b/foundry/models/float_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class FloatType(BaseModel): """ FloatType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["float"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_point.py b/foundry/models/geo_point.py index 64aaa9148..84d761d0e 100644 --- a/foundry/models/geo_point.py +++ b/foundry/models/geo_point.py @@ -38,21 +38,25 @@ from typing_extensions import Annotated from typing_extensions import Self + class GeoPoint(BaseModel): """ GeoPoint - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)] = Field(description="GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as \"M\") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ") + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] = Field( + description='GeoJSon fundamental geometry construct. A position is an array of numbers. There MUST be two or more elements. The first two elements are longitude and latitude, precisely in that order and using decimal numbers. Altitude or elevation MAY be included as an optional third element. Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers. ' + ) type: Literal["Point"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_point_type.py b/foundry/models/geo_point_type.py index 46d10da35..c5becf4c9 100644 --- a/foundry/models/geo_point_type.py +++ b/foundry/models/geo_point_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class GeoPointType(BaseModel): """ GeoPointType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["geopoint"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geo_shape_type.py b/foundry/models/geo_shape_type.py index d848b9d8d..a75faa14c 100644 --- a/foundry/models/geo_shape_type.py +++ b/foundry/models/geo_shape_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class GeoShapeType(BaseModel): """ GeoShapeType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["geoshape"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/geometry.py b/foundry/models/geometry.py index 175e23cf4..6627faffe 100644 --- a/foundry/models/geometry.py +++ b/foundry/models/geometry.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -54,19 +55,18 @@ class GeometryCollection(BaseModel): """ - GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") + GeoJSon geometry collection GeometryCollections composed of a single part or a number of parts of a single type SHOULD be avoided when that single part or a single object of multipart type (MultiPoint, MultiLineString, or MultiPolygon) could be used instead. + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) geometries: Optional[Annotated[List[Geometry], Field(min_length=0)]] = None type: Literal["GeometryCollection"] __properties: ClassVar[Set[str]] = set(("bbox", "geometries", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -94,8 +94,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in geometries (list) @@ -104,7 +103,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.geometries: if _item: _items.append(_item.to_dict()) - _dict['geometries'] = _items + _dict["geometries"] = _items return _dict @classmethod @@ -116,14 +115,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors GeometryCollection.model_rebuild(raise_errors=False) @@ -131,9 +131,12 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ Abstract type for all GeoJSon object except Feature and FeatureCollection """ -Geometry = Annotated[Union[GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon], Field(discriminator="type")] - - +Geometry = Annotated[ + Union[ + GeoPoint, GeometryCollection, LineString, MultiLineString, MultiPoint, MultiPolygon, Polygon + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/integer_type.py b/foundry/models/integer_type.py index 38440b840..6ce6dd4a2 100644 --- a/foundry/models/integer_type.py +++ b/foundry/models/integer_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class IntegerType(BaseModel): """ IntegerType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["integer"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/line_string.py b/foundry/models/line_string.py index b0648ddf4..058a3caa6 100644 --- a/foundry/models/line_string.py +++ b/foundry/models/line_string.py @@ -38,21 +38,29 @@ from typing_extensions import Annotated from typing_extensions import Self + class LineString(BaseModel): """ LineString - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]] = Field(default=None, description="GeoJSon fundamental geometry construct, array of two or more positions. ") + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + Annotated[ + List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], + Field(min_length=2), + ] + ] = Field( + default=None, + description="GeoJSon fundamental geometry construct, array of two or more positions. ", + ) type: Literal["LineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +88,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +102,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_side.py b/foundry/models/link_type_side.py index 2ef43e8d0..976573715 100644 --- a/foundry/models/link_type_side.py +++ b/foundry/models/link_type_side.py @@ -39,24 +39,42 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class LinkTypeSide(BaseModel): """ LinkTypeSide - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="apiName", + ) cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + foreign_key_property_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="foreignKeyPropertyApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "cardinality", + "displayName", + "foreignKeyPropertyApiName", + "objectTypeApiName", + "status", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +102,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -99,12 +116,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/link_type_side_cardinality.py b/foundry/models/link_type_side_cardinality.py index bf74fc408..54188958b 100644 --- a/foundry/models/link_type_side_cardinality.py +++ b/foundry/models/link_type_side_cardinality.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,12 +47,10 @@ class LinkTypeSideCardinality(str, Enum): """ allowed enum values """ - ONE = 'ONE' - MANY = 'MANY' + ONE = "ONE" + MANY = "MANY" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of LinkTypeSideCardinality from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/link_type_side_v2.py b/foundry/models/link_type_side_v2.py index 5cffe22ba..f9b964386 100644 --- a/foundry/models/link_type_side_v2.py +++ b/foundry/models/link_type_side_v2.py @@ -39,24 +39,42 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class LinkTypeSideV2(BaseModel): """ LinkTypeSideV2 - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", alias="apiName") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the link type in the API. To find the API name for your Link Type, check the **Ontology Manager** application. ", + alias="apiName", + ) cardinality: LinkTypeSideCardinality - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - foreign_key_property_api_name: Optional[StrictStr] = Field(default=None, description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="foreignKeyPropertyApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + foreign_key_property_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="foreignKeyPropertyApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) status: ReleaseStatus - __properties: ClassVar[Set[str]] = set(("apiName", "cardinality", "displayName", "foreignKeyPropertyApiName", "objectTypeApiName", "status")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "cardinality", + "displayName", + "foreignKeyPropertyApiName", + "objectTypeApiName", + "status", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +102,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -99,12 +116,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_action_types_response.py b/foundry/models/list_action_types_response.py index 5764c23c5..ddc1154aa 100644 --- a/foundry/models/list_action_types_response.py +++ b/foundry/models/list_action_types_response.py @@ -38,20 +38,21 @@ from foundry.models.action_type import ActionType from typing_extensions import Self + class ListActionTypesResponse(BaseModel): """ ListActionTypesResponse - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[ActionType]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_action_types_response_v2.py b/foundry/models/list_action_types_response_v2.py index 8ade15754..8ec108e8e 100644 --- a/foundry/models/list_action_types_response_v2.py +++ b/foundry/models/list_action_types_response_v2.py @@ -38,20 +38,21 @@ from foundry.models.action_type_v2 import ActionTypeV2 from typing_extensions import Self + class ListActionTypesResponseV2(BaseModel): """ ListActionTypesResponseV2 - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[ActionTypeV2]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_branches_response.py b/foundry/models/list_branches_response.py index 3927e363b..d6e2c905e 100644 --- a/foundry/models/list_branches_response.py +++ b/foundry/models/list_branches_response.py @@ -38,20 +38,23 @@ from foundry.models.branch import Branch from typing_extensions import Self + class ListBranchesResponse(BaseModel): """ ListBranchesResponse - """ # noqa: E501 - data: Optional[List[Branch]] = Field(default=None, description="The list of branches in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[Branch]] = Field( + default=None, description="The list of branches in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_deployments_response.py b/foundry/models/list_deployments_response.py index 904c04b6f..6c2537255 100644 --- a/foundry/models/list_deployments_response.py +++ b/foundry/models/list_deployments_response.py @@ -37,19 +37,16 @@ from foundry.models.deployment_listing import DeploymentListing from typing_extensions import Self + class ListDeploymentsResponse(BaseModel): """ ListDeploymentsResponse - """ # noqa: E501 + """ # noqa: E501 + deployments: Optional[List[DeploymentListing]] = None __properties: ClassVar[Set[str]] = set(("deployments")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -77,8 +74,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in deployments (list) @@ -87,7 +83,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.deployments: if _item: _items.append(_item.to_dict()) - _dict['deployments'] = _items + _dict["deployments"] = _items return _dict @classmethod @@ -99,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_files_response.py b/foundry/models/list_files_response.py index a58b7d14d..46b45e632 100644 --- a/foundry/models/list_files_response.py +++ b/foundry/models/list_files_response.py @@ -38,20 +38,21 @@ from foundry.models.file import File from typing_extensions import Self + class ListFilesResponse(BaseModel): """ A page of Files and an optional page token that can be used to retrieve the next page. - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[File]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_object_types_response.py b/foundry/models/list_object_types_response.py index f21235de7..d07e6618b 100644 --- a/foundry/models/list_object_types_response.py +++ b/foundry/models/list_object_types_response.py @@ -38,20 +38,23 @@ from foundry.models.object_type import ObjectType from typing_extensions import Self + class ListObjectTypesResponse(BaseModel): """ ListObjectTypesResponse - """ # noqa: E501 - data: Optional[List[ObjectType]] = Field(default=None, description="The list of object types in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[ObjectType]] = Field( + default=None, description="The list of object types in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_object_types_v2_response.py b/foundry/models/list_object_types_v2_response.py index 361d10991..9e963bb67 100644 --- a/foundry/models/list_object_types_v2_response.py +++ b/foundry/models/list_object_types_v2_response.py @@ -38,20 +38,23 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self + class ListObjectTypesV2Response(BaseModel): """ ListObjectTypesV2Response - """ # noqa: E501 - data: Optional[List[ObjectTypeV2]] = Field(default=None, description="The list of object types in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[ObjectTypeV2]] = Field( + default=None, description="The list of object types in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_ontologies_response.py b/foundry/models/list_ontologies_response.py index 5dc17ca14..7a83d1e54 100644 --- a/foundry/models/list_ontologies_response.py +++ b/foundry/models/list_ontologies_response.py @@ -38,19 +38,18 @@ from foundry.models.ontology import Ontology from typing_extensions import Self + class ListOntologiesResponse(BaseModel): """ ListOntologiesResponse - """ # noqa: E501 - data: Optional[List[Ontology]] = Field(default=None, description="The list of Ontologies the user has access to.") - __properties: ClassVar[Set[str]] = set(("data")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + data: Optional[List[Ontology]] = Field( + default=None, description="The list of Ontologies the user has access to." + ) + __properties: ClassVar[Set[str]] = set(("data")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -100,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_ontologies_v2_response.py b/foundry/models/list_ontologies_v2_response.py index 262395847..12b880f7c 100644 --- a/foundry/models/list_ontologies_v2_response.py +++ b/foundry/models/list_ontologies_v2_response.py @@ -38,19 +38,18 @@ from foundry.models.ontology_v2 import OntologyV2 from typing_extensions import Self + class ListOntologiesV2Response(BaseModel): """ ListOntologiesV2Response - """ # noqa: E501 - data: Optional[List[OntologyV2]] = Field(default=None, description="The list of Ontologies the user has access to.") - __properties: ClassVar[Set[str]] = set(("data")) + """ # noqa: E501 - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + data: Optional[List[OntologyV2]] = Field( + default=None, description="The list of Ontologies the user has access to." + ) + __properties: ClassVar[Set[str]] = set(("data")) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -88,7 +86,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -100,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_outgoing_link_types_response.py b/foundry/models/list_outgoing_link_types_response.py index 4ac325ce5..17e5d4a88 100644 --- a/foundry/models/list_outgoing_link_types_response.py +++ b/foundry/models/list_outgoing_link_types_response.py @@ -38,20 +38,23 @@ from foundry.models.link_type_side import LinkTypeSide from typing_extensions import Self + class ListOutgoingLinkTypesResponse(BaseModel): """ ListOutgoingLinkTypesResponse - """ # noqa: E501 - data: Optional[List[LinkTypeSide]] = Field(default=None, description="The list of link type sides in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[LinkTypeSide]] = Field( + default=None, description="The list of link type sides in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_outgoing_link_types_response_v2.py b/foundry/models/list_outgoing_link_types_response_v2.py index d41bcdecf..20abfd54f 100644 --- a/foundry/models/list_outgoing_link_types_response_v2.py +++ b/foundry/models/list_outgoing_link_types_response_v2.py @@ -38,20 +38,23 @@ from foundry.models.link_type_side_v2 import LinkTypeSideV2 from typing_extensions import Self + class ListOutgoingLinkTypesResponseV2(BaseModel): """ ListOutgoingLinkTypesResponseV2 - """ # noqa: E501 - data: Optional[List[LinkTypeSideV2]] = Field(default=None, description="The list of link type sides in the current page.") - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + """ # noqa: E501 + + data: Optional[List[LinkTypeSideV2]] = Field( + default=None, description="The list of link type sides in the current page." + ) + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +91,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +103,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_query_types_response.py b/foundry/models/list_query_types_response.py index ff3697f04..e64275770 100644 --- a/foundry/models/list_query_types_response.py +++ b/foundry/models/list_query_types_response.py @@ -38,20 +38,21 @@ from foundry.models.query_type import QueryType from typing_extensions import Self + class ListQueryTypesResponse(BaseModel): """ ListQueryTypesResponse - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[QueryType]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/list_query_types_response_v2.py b/foundry/models/list_query_types_response_v2.py index 54c39ce52..090d061dd 100644 --- a/foundry/models/list_query_types_response_v2.py +++ b/foundry/models/list_query_types_response_v2.py @@ -38,20 +38,21 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self + class ListQueryTypesResponseV2(BaseModel): """ ListQueryTypesResponseV2 - """ # noqa: E501 + """ # noqa: E501 + data: Optional[List[QueryTypeV2]] = None - next_page_token: Optional[StrictStr] = Field(default=None, description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", alias="nextPageToken") + next_page_token: Optional[StrictStr] = Field( + default=None, + description="The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the `nextPageToken` field of the previous response and populate the next request's `pageToken` field with it. ", + alias="nextPageToken", + ) __properties: ClassVar[Set[str]] = set(("data", "nextPageToken")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +80,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in data (list) @@ -89,7 +89,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['data'] = _items + _dict["data"] = _items return _dict @classmethod @@ -101,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/logic_rule.py b/foundry/models/logic_rule.py index 5948cca46..991de14ba 100644 --- a/foundry/models/logic_rule.py +++ b/foundry/models/logic_rule.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -46,13 +47,13 @@ from foundry.models.modify_object_rule import ModifyObjectRule - """ LogicRule """ -LogicRule = Annotated[Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], Field(discriminator="type")] - - +LogicRule = Annotated[ + Union[CreateLinkRule, CreateObjectRule, DeleteLinkRule, DeleteObjectRule, ModifyObjectRule], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/long_type.py b/foundry/models/long_type.py index e2234d664..24dd2e1c2 100644 --- a/foundry/models/long_type.py +++ b/foundry/models/long_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class LongType(BaseModel): """ LongType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["long"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/model_api_data_type.py b/foundry/models/model_api_data_type.py index b2fa653d6..ee9e829a4 100644 --- a/foundry/models/model_api_data_type.py +++ b/foundry/models/model_api_data_type.py @@ -38,21 +38,18 @@ from foundry.models.model_api_type import ModelApiType from typing_extensions import Self + class ModelApiDataType(BaseModel): """ - An object definition representing an input or an output type for the deployment API. - """ # noqa: E501 + An object definition representing an input or an output type for the deployment API. + """ # noqa: E501 + name: Optional[StrictStr] = Field(default=None, description="The name of a field. ") property_type: Optional[ModelApiType] = Field(default=None, alias="propertyType") required: Optional[StrictBool] = None __properties: ClassVar[Set[str]] = set(("name", "propertyType", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +77,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of property_type if self.property_type: - _dict['propertyType'] = self.property_type.to_dict() + _dict["propertyType"] = self.property_type.to_dict() return _dict @classmethod @@ -98,12 +94,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/model_api_type.py b/foundry/models/model_api_type.py index 6adf3b44d..9a25740ed 100644 --- a/foundry/models/model_api_type.py +++ b/foundry/models/model_api_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -55,17 +56,13 @@ class ModelApiUnionType(BaseModel): """ ModelApiUnionType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["union"] union_types: Optional[List[ModelApiType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -93,8 +90,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -103,7 +99,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict['unionTypes'] = _items + _dict["unionTypes"] = _items return _dict @classmethod @@ -115,31 +111,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiUnionType.model_rebuild(raise_errors=False) + class ModelApiStructField(BaseModel): """ ModelApiStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: ModelApiType = Field(alias="fieldType") name: StrictStr __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -167,13 +161,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -185,31 +178,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiStructField.model_rebuild(raise_errors=False) + class ModelApiStructType(BaseModel): """ ModelApiStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[ModelApiStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -237,8 +228,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -247,7 +237,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -259,32 +249,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiStructType.model_rebuild(raise_errors=False) + class ModelApiMapType(BaseModel): """ ModelApiMapType - """ # noqa: E501 + """ # noqa: E501 + key_type: ModelApiType = Field(alias="keyType") type: Literal["map"] value_type: ModelApiType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -312,16 +300,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -333,31 +320,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiMapType.model_rebuild(raise_errors=False) + class ModelApiArrayType(BaseModel): """ ModelApiArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ModelApiType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -385,13 +370,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -403,14 +387,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors ModelApiArrayType.model_rebuild(raise_errors=False) @@ -418,9 +403,23 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by models. """ -ModelApiType = Annotated[Union[AnyType, BooleanType, DateType, FloatType, IntegerType, ModelApiArrayType, ModelApiMapType, ModelApiStructType, ModelApiUnionType, NullType, StringType, TimestampType], Field(discriminator="type")] - - +ModelApiType = Annotated[ + Union[ + AnyType, + BooleanType, + DateType, + FloatType, + IntegerType, + ModelApiArrayType, + ModelApiMapType, + ModelApiStructType, + ModelApiUnionType, + NullType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/model_property.py b/foundry/models/model_property.py index 1d773bf2e..e2c5ba4c6 100644 --- a/foundry/models/model_property.py +++ b/foundry/models/model_property.py @@ -37,21 +37,23 @@ from pydantic import Field from typing_extensions import Self + class ModelProperty(BaseModel): """ Details about some property of an object. - """ # noqa: E501 - base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") + """ # noqa: E501 + + base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="baseType", + ) description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) __properties: ClassVar[Set[str]] = set(("baseType", "description", "displayName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/modify_object_rule.py b/foundry/models/modify_object_rule.py index 9f3331ff3..ad80aae8d 100644 --- a/foundry/models/modify_object_rule.py +++ b/foundry/models/modify_object_rule.py @@ -37,20 +37,20 @@ from pydantic import Field from typing_extensions import Self + class ModifyObjectRule(BaseModel): """ ModifyObjectRule - """ # noqa: E501 - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["modifyObject"] __properties: ClassVar[Set[str]] = set(("objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +78,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +92,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_line_string.py b/foundry/models/multi_line_string.py index 2fbd194d9..0984b4d8d 100644 --- a/foundry/models/multi_line_string.py +++ b/foundry/models/multi_line_string.py @@ -38,21 +38,32 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiLineString(BaseModel): """ MultiLineString - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=2)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=2), + ] + ] + ] = None type: Literal["MultiLineString"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_point.py b/foundry/models/multi_point.py index 31277bba6..ab905a5ed 100644 --- a/foundry/models/multi_point.py +++ b/foundry/models/multi_point.py @@ -38,21 +38,23 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiPoint(BaseModel): """ MultiPoint - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]] + ] = None type: Literal["MultiPoint"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/multi_polygon.py b/foundry/models/multi_polygon.py index b336bb887..e5afbf19e 100644 --- a/foundry/models/multi_polygon.py +++ b/foundry/models/multi_polygon.py @@ -38,21 +38,34 @@ from typing_extensions import Annotated from typing_extensions import Self + class MultiPolygon(BaseModel): """ MultiPolygon - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=4), + ] + ] + ] + ] = None type: Literal["MultiPolygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +93,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +107,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/null_type.py b/foundry/models/null_type.py index c7c4a45f0..4ce134496 100644 --- a/foundry/models/null_type.py +++ b/foundry/models/null_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class NullType(BaseModel): """ NullType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["null"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_property_type.py b/foundry/models/object_property_type.py index 43d142b5b..7313f363b 100644 --- a/foundry/models/object_property_type.py +++ b/foundry/models/object_property_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -62,17 +63,13 @@ class OntologyObjectArrayType(BaseModel): """ OntologyObjectArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: ObjectPropertyType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -100,13 +97,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -118,14 +114,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyObjectArrayType.model_rebuild(raise_errors=False) @@ -133,9 +130,27 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Object properties. """ -ObjectPropertyType = Annotated[Union[AttachmentType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, GeoPointType, GeoShapeType, IntegerType, LongType, OntologyObjectArrayType, ShortType, StringType, TimeseriesType, TimestampType], Field(discriminator="type")] - - +ObjectPropertyType = Annotated[ + Union[ + AttachmentType, + BooleanType, + ByteType, + DateType, + DecimalType, + DoubleType, + FloatType, + GeoPointType, + GeoShapeType, + IntegerType, + LongType, + OntologyObjectArrayType, + ShortType, + StringType, + TimeseriesType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/object_type.py b/foundry/models/object_type.py index be77397c3..f406f6a13 100644 --- a/foundry/models/object_type.py +++ b/foundry/models/object_type.py @@ -40,26 +40,49 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ObjectType(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") - primary_key: Optional[List[StrictStr]] = Field(default=None, description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", alias="primaryKey") - properties: Optional[Dict[str, ModelProperty]] = Field(default=None, description="A map of the properties of the object type.") - rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) + description: Optional[StrictStr] = Field( + default=None, description="The description of the object type." + ) + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) + primary_key: Optional[List[StrictStr]] = Field( + default=None, + description="The primary key of the object. This is a list of properties that can be used to uniquely identify the object.", + alias="primaryKey", + ) + properties: Optional[Dict[str, ModelProperty]] = Field( + default=None, description="A map of the properties of the object type." + ) + rid: StrictStr = Field( + description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." + ) status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "description", + "displayName", + "primaryKey", + "properties", + "rid", + "status", + "visibility", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +110,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -97,7 +119,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict['properties'] = _field_dict + _dict["properties"] = _field_dict return _dict @classmethod @@ -109,12 +131,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_v2.py b/foundry/models/object_type_v2.py index 6d35c1be4..73960523d 100644 --- a/foundry/models/object_type_v2.py +++ b/foundry/models/object_type_v2.py @@ -40,26 +40,48 @@ from foundry.models.release_status import ReleaseStatus from typing_extensions import Self + class ObjectTypeV2(BaseModel): """ Represents an object type in the Ontology. - """ # noqa: E501 - api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="apiName") - description: Optional[StrictStr] = Field(default=None, description="The description of the object type.") - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") - primary_key: StrictStr = Field(description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", alias="primaryKey") - properties: Optional[Dict[str, PropertyV2]] = Field(default=None, description="A map of the properties of the object type.") - rid: StrictStr = Field(description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs.") + """ # noqa: E501 + + api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="apiName", + ) + description: Optional[StrictStr] = Field( + default=None, description="The description of the object type." + ) + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) + primary_key: StrictStr = Field( + description="The name of the property in the API. To find the API name for your property, use the `Get object type` endpoint or check the **Ontology Manager**. ", + alias="primaryKey", + ) + properties: Optional[Dict[str, PropertyV2]] = Field( + default=None, description="A map of the properties of the object type." + ) + rid: StrictStr = Field( + description="The unique resource identifier of an object type, useful for interacting with other Foundry APIs." + ) status: ReleaseStatus visibility: Optional[ObjectTypeVisibility] = None - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "primaryKey", "properties", "rid", "status", "visibility")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ( + "apiName", + "description", + "displayName", + "primaryKey", + "properties", + "rid", + "status", + "visibility", + ) + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -87,8 +109,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in properties (dict) @@ -97,7 +118,7 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.properties: if self.properties[_key]: _field_dict[_key] = self.properties[_key].to_dict() - _dict['properties'] = _field_dict + _dict["properties"] = _field_dict return _dict @classmethod @@ -109,12 +130,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/object_type_visibility.py b/foundry/models/object_type_visibility.py index ca48c1875..02ba36e24 100644 --- a/foundry/models/object_type_visibility.py +++ b/foundry/models/object_type_visibility.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,13 +47,11 @@ class ObjectTypeVisibility(str, Enum): """ allowed enum values """ - NORMAL = 'NORMAL' - PROMINENT = 'PROMINENT' - HIDDEN = 'HIDDEN' + NORMAL = "NORMAL" + PROMINENT = "PROMINENT" + HIDDEN = "HIDDEN" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ObjectTypeVisibility from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/object_type_with_link.py b/foundry/models/object_type_with_link.py index 79d6e8134..7af2a30dc 100644 --- a/foundry/models/object_type_with_link.py +++ b/foundry/models/object_type_with_link.py @@ -39,20 +39,17 @@ from foundry.models.object_type_v2 import ObjectTypeV2 from typing_extensions import Self + class ObjectTypeWithLink(BaseModel): """ ObjectTypeWithLink - """ # noqa: E501 + """ # noqa: E501 + link_types: Optional[List[LinkTypeSideV2]] = Field(default=None, alias="linkTypes") object_type: ObjectTypeV2 = Field(alias="objectType") __properties: ClassVar[Set[str]] = set(("linkTypes", "objectType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +77,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in link_types (list) @@ -90,10 +86,10 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.link_types: if _item: _items.append(_item.to_dict()) - _dict['linkTypes'] = _items + _dict["linkTypes"] = _items # override the default output from pydantic by calling `to_dict()` of object_type if self.object_type: - _dict['objectType'] = self.object_type.to_dict() + _dict["objectType"] = self.object_type.to_dict() return _dict @classmethod @@ -105,12 +101,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology.py b/foundry/models/ontology.py index 2a827d4d7..1715c3703 100644 --- a/foundry/models/ontology.py +++ b/foundry/models/ontology.py @@ -37,22 +37,23 @@ from pydantic import Field from typing_extensions import Self + class Ontology(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + rid: StrictStr = Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " + ) __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_data_type.py b/foundry/models/ontology_data_type.py index 93c81fbf4..cf174a385 100644 --- a/foundry/models/ontology_data_type.py +++ b/foundry/models/ontology_data_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -63,18 +64,14 @@ class OntologyStructField(BaseModel): """ OntologyStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: OntologyDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") required: StrictBool __properties: ClassVar[Set[str]] = set(("fieldType", "name", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -102,13 +99,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -120,31 +116,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyStructField.model_rebuild(raise_errors=False) + class OntologyStructType(BaseModel): """ OntologyStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[OntologyStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -172,8 +166,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -182,7 +175,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -194,31 +187,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyStructType.model_rebuild(raise_errors=False) + class OntologySetType(BaseModel): """ OntologySetType - """ # noqa: E501 + """ # noqa: E501 + item_type: OntologyDataType = Field(alias="itemType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -246,13 +237,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -264,32 +254,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologySetType.model_rebuild(raise_errors=False) + class OntologyMapType(BaseModel): """ OntologyMapType - """ # noqa: E501 + """ # noqa: E501 + key_type: OntologyDataType = Field(alias="keyType") type: Literal["map"] value_type: OntologyDataType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -317,16 +305,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -338,31 +325,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyMapType.model_rebuild(raise_errors=False) + class OntologyArrayType(BaseModel): """ OntologyArrayType - """ # noqa: E501 + """ # noqa: E501 + item_type: OntologyDataType = Field(alias="itemType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -390,13 +375,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -408,14 +392,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors OntologyArrayType.model_rebuild(raise_errors=False) @@ -423,9 +408,31 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the primitive types used by Palantir's Ontology-based products. """ -OntologyDataType = Annotated[Union[AnyType, BinaryType, BooleanType, ByteType, DateType, DecimalType, DoubleType, FloatType, IntegerType, LongType, OntologyArrayType, OntologyMapType, OntologyObjectSetType, OntologyObjectType, OntologySetType, OntologyStructType, ShortType, StringType, TimestampType, UnsupportedType], Field(discriminator="type")] - - +OntologyDataType = Annotated[ + Union[ + AnyType, + BinaryType, + BooleanType, + ByteType, + DateType, + DecimalType, + DoubleType, + FloatType, + IntegerType, + LongType, + OntologyArrayType, + OntologyMapType, + OntologyObjectSetType, + OntologyObjectType, + OntologySetType, + OntologyStructType, + ShortType, + StringType, + TimestampType, + UnsupportedType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/ontology_full_metadata.py b/foundry/models/ontology_full_metadata.py index 887cb889e..43cd31d51 100644 --- a/foundry/models/ontology_full_metadata.py +++ b/foundry/models/ontology_full_metadata.py @@ -41,22 +41,19 @@ from foundry.models.query_type_v2 import QueryTypeV2 from typing_extensions import Self + class OntologyFullMetadata(BaseModel): """ OntologyFullMetadata - """ # noqa: E501 + """ # noqa: E501 + action_types: Optional[Dict[str, ActionTypeV2]] = Field(default=None, alias="actionTypes") object_types: Optional[Dict[str, ObjectTypeWithLink]] = Field(default=None, alias="objectTypes") ontology: OntologyV2 query_types: Optional[Dict[str, QueryTypeV2]] = Field(default=None, alias="queryTypes") __properties: ClassVar[Set[str]] = set(("actionTypes", "objectTypes", "ontology", "queryTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -84,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each value in action_types (dict) @@ -94,24 +90,24 @@ def to_dict(self) -> Dict[str, Any]: for _key in self.action_types: if self.action_types[_key]: _field_dict[_key] = self.action_types[_key].to_dict() - _dict['actionTypes'] = _field_dict + _dict["actionTypes"] = _field_dict # override the default output from pydantic by calling `to_dict()` of each value in object_types (dict) _field_dict = {} if self.object_types: for _key in self.object_types: if self.object_types[_key]: _field_dict[_key] = self.object_types[_key].to_dict() - _dict['objectTypes'] = _field_dict + _dict["objectTypes"] = _field_dict # override the default output from pydantic by calling `to_dict()` of ontology if self.ontology: - _dict['ontology'] = self.ontology.to_dict() + _dict["ontology"] = self.ontology.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in query_types (dict) _field_dict = {} if self.query_types: for _key in self.query_types: if self.query_types[_key]: _field_dict[_key] = self.query_types[_key].to_dict() - _dict['queryTypes'] = _field_dict + _dict["queryTypes"] = _field_dict return _dict @classmethod @@ -123,12 +119,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_object_set_type.py b/foundry/models/ontology_object_set_type.py index a81bbc7b1..c36bbd127 100644 --- a/foundry/models/ontology_object_set_type.py +++ b/foundry/models/ontology_object_set_type.py @@ -37,21 +37,26 @@ from pydantic import Field from typing_extensions import Self + class OntologyObjectSetType(BaseModel): """ OntologyObjectSetType - """ # noqa: E501 - object_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") - object_type_api_name: Optional[StrictStr] = Field(default=None, description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectApiName", + ) + object_type_api_name: Optional[StrictStr] = Field( + default=None, + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["objectSet"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +84,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_object_type.py b/foundry/models/ontology_object_type.py index 95d259811..8ab4a458f 100644 --- a/foundry/models/ontology_object_type.py +++ b/foundry/models/ontology_object_type.py @@ -37,21 +37,24 @@ from pydantic import Field from typing_extensions import Self + class OntologyObjectType(BaseModel): """ OntologyObjectType - """ # noqa: E501 - object_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectApiName") - object_type_api_name: StrictStr = Field(description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", alias="objectTypeApiName") + """ # noqa: E501 + + object_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectApiName", + ) + object_type_api_name: StrictStr = Field( + description="The name of the object type in the API in camelCase format. To find the API name for your Object Type, use the `List object types` endpoint or check the **Ontology Manager**. ", + alias="objectTypeApiName", + ) type: Literal["object"] __properties: ClassVar[Set[str]] = set(("objectApiName", "objectTypeApiName", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,8 +82,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -94,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/ontology_v2.py b/foundry/models/ontology_v2.py index 9b9968ef9..bf5a79da4 100644 --- a/foundry/models/ontology_v2.py +++ b/foundry/models/ontology_v2.py @@ -37,22 +37,23 @@ from pydantic import Field from typing_extensions import Self + class OntologyV2(BaseModel): """ Metadata about an Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(alias="apiName") description: StrictStr - display_name: StrictStr = Field(description="The display name of the entity.", alias="displayName") - rid: StrictStr = Field(description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. ") + display_name: StrictStr = Field( + description="The display name of the entity.", alias="displayName" + ) + rid: StrictStr = Field( + description="The unique Resource Identifier (RID) of the Ontology. To look up your Ontology RID, please use the `List ontologies` endpoint or check the **Ontology Manager**. " + ) __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "rid")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +81,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +95,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/parameter.py b/foundry/models/parameter.py index 9613dfeb9..d5065065c 100644 --- a/foundry/models/parameter.py +++ b/foundry/models/parameter.py @@ -38,22 +38,22 @@ from foundry.models.ontology_data_type import OntologyDataType from typing_extensions import Self + class Parameter(BaseModel): """ Details about a parameter of an action or query. - """ # noqa: E501 - base_type: StrictStr = Field(description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", alias="baseType") + """ # noqa: E501 + + base_type: StrictStr = Field( + description="A string indicating the type of each data value. Note that these types can be nested, for example an array of structs. | Type | JSON value | |---------------------|-------------------------------------------------------------------------------------------------------------------| | Array | `Array`, where `T` is the type of the array elements, e.g. `Array`. | | Attachment | `Attachment` | | Boolean | `Boolean` | | Byte | `Byte` | | Date | `LocalDate` | | Decimal | `Decimal` | | Double | `Double` | | Float | `Float` | | Integer | `Integer` | | Long | `Long` | | OntologyObject | `OntologyObject` where `T` is the API name of the referenced object type. | | Short | `Short` | | String | `String` | | Struct | `Struct` where `T` contains field name and type pairs, e.g. `Struct<{ firstName: String, lastName: string }>` | | Timeseries | `TimeSeries` where `T` is either `String` for an enum series or `Double` for a numeric series. | | Timestamp | `Timestamp` | ", + alias="baseType", + ) data_type: Optional[OntologyDataType] = Field(default=None, alias="dataType") description: Optional[StrictStr] = None required: StrictBool __properties: ClassVar[Set[str]] = set(("baseType", "dataType", "description", "required")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,13 +81,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -99,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/polygon.py b/foundry/models/polygon.py index 933f4cb68..9b58afccb 100644 --- a/foundry/models/polygon.py +++ b/foundry/models/polygon.py @@ -38,21 +38,32 @@ from typing_extensions import Annotated from typing_extensions import Self + class Polygon(BaseModel): """ Polygon - """ # noqa: E501 - bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="A GeoJSON object MAY have a member named \"bbox\" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ") - coordinates: Optional[List[Annotated[List[Annotated[List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3)]], Field(min_length=4)]]] = None + """ # noqa: E501 + + bbox: Optional[List[Union[StrictFloat, StrictInt]]] = Field( + default=None, + description='A GeoJSON object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries. ', + ) + coordinates: Optional[ + List[ + Annotated[ + List[ + Annotated[ + List[Union[StrictFloat, StrictInt]], Field(min_length=2, max_length=3) + ] + ], + Field(min_length=4), + ] + ] + ] = None type: Literal["Polygon"] __properties: ClassVar[Set[str]] = set(("bbox", "coordinates", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -95,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/property_v2.py b/foundry/models/property_v2.py index 2a518bf0f..5342f2ec6 100644 --- a/foundry/models/property_v2.py +++ b/foundry/models/property_v2.py @@ -38,21 +38,20 @@ from foundry.models.object_property_type import ObjectPropertyType from typing_extensions import Self + class PropertyV2(BaseModel): """ Details about some property of an object. - """ # noqa: E501 + """ # noqa: E501 + data_type: ObjectPropertyType = Field(alias="dataType") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) __properties: ClassVar[Set[str]] = set(("dataType", "description", "displayName")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -80,13 +79,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -98,12 +96,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_aggregation_key_type.py b/foundry/models/query_aggregation_key_type.py index 03d8cff53..03c0ac36c 100644 --- a/foundry/models/query_aggregation_key_type.py +++ b/foundry/models/query_aggregation_key_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -48,13 +49,21 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation keys. """ -QueryAggregationKeyType = Annotated[Union[BooleanType, DateType, DoubleType, IntegerType, QueryAggregationRangeType, StringType, TimestampType], Field(discriminator="type")] - - +QueryAggregationKeyType = Annotated[ + Union[ + BooleanType, + DateType, + DoubleType, + IntegerType, + QueryAggregationRangeType, + StringType, + TimestampType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_aggregation_range_sub_type.py b/foundry/models/query_aggregation_range_sub_type.py index 16c0246ba..63731e76d 100644 --- a/foundry/models/query_aggregation_range_sub_type.py +++ b/foundry/models/query_aggregation_range_sub_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -45,16 +46,17 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation ranges. """ -QueryAggregationRangeSubType = Annotated[Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type")] - - +QueryAggregationRangeSubType = Annotated[ + Union[DateType, DoubleType, IntegerType, TimestampType], Field(discriminator="type") +] # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__(QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType)) +object.__setattr__( + QueryAggregationRangeSubType, "type_adapter", TypeAdapter(QueryAggregationRangeSubType) +) diff --git a/foundry/models/query_aggregation_range_type.py b/foundry/models/query_aggregation_range_type.py index 1ae4bb2cb..2e5368370 100644 --- a/foundry/models/query_aggregation_range_type.py +++ b/foundry/models/query_aggregation_range_type.py @@ -38,20 +38,17 @@ from foundry.models.query_aggregation_range_sub_type import QueryAggregationRangeSubType from typing_extensions import Self + class QueryAggregationRangeType(BaseModel): """ QueryAggregationRangeType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryAggregationRangeSubType = Field(alias="subType") type: Literal["range"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_aggregation_value_type.py b/foundry/models/query_aggregation_value_type.py index a76310413..c0b2cf5fa 100644 --- a/foundry/models/query_aggregation_value_type.py +++ b/foundry/models/query_aggregation_value_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -44,16 +45,17 @@ from foundry.models.timestamp_type import TimestampType - """ A union of all the types supported by query aggregation keys. """ -QueryAggregationValueType = Annotated[Union[DateType, DoubleType, TimestampType], Field(discriminator="type")] - - +QueryAggregationValueType = Annotated[ + Union[DateType, DoubleType, TimestampType], Field(discriminator="type") +] # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. -object.__setattr__(QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType)) +object.__setattr__( + QueryAggregationValueType, "type_adapter", TypeAdapter(QueryAggregationValueType) +) diff --git a/foundry/models/query_data_type.py b/foundry/models/query_data_type.py index 059e3a873..d1e4c442d 100644 --- a/foundry/models/query_data_type.py +++ b/foundry/models/query_data_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -62,17 +63,13 @@ class QueryUnionType(BaseModel): """ QueryUnionType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["union"] union_types: Optional[List[QueryDataType]] = Field(default=None, alias="unionTypes") __properties: ClassVar[Set[str]] = set(("type", "unionTypes")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -100,8 +97,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in union_types (list) @@ -110,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.union_types: if _item: _items.append(_item.to_dict()) - _dict['unionTypes'] = _items + _dict["unionTypes"] = _items return _dict @classmethod @@ -122,31 +118,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryUnionType.model_rebuild(raise_errors=False) + class QueryStructField(BaseModel): """ QueryStructField - """ # noqa: E501 + """ # noqa: E501 + field_type: QueryDataType = Field(alias="fieldType") name: StrictStr = Field(description="The name of a field in a `Struct`. ") __properties: ClassVar[Set[str]] = set(("fieldType", "name")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -174,13 +168,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of field_type if self.field_type: - _dict['fieldType'] = self.field_type.to_dict() + _dict["fieldType"] = self.field_type.to_dict() return _dict @classmethod @@ -192,31 +185,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryStructField.model_rebuild(raise_errors=False) + class QueryStructType(BaseModel): """ QueryStructType - """ # noqa: E501 + """ # noqa: E501 + fields: Optional[List[QueryStructField]] = None type: Literal["struct"] __properties: ClassVar[Set[str]] = set(("fields", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -244,8 +235,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of each item in fields (list) @@ -254,7 +244,7 @@ def to_dict(self) -> Dict[str, Any]: for _item in self.fields: if _item: _items.append(_item.to_dict()) - _dict['fields'] = _items + _dict["fields"] = _items return _dict @classmethod @@ -266,31 +256,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryStructType.model_rebuild(raise_errors=False) + class QuerySetType(BaseModel): """ QuerySetType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryDataType = Field(alias="subType") type: Literal["set"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -318,13 +306,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -336,31 +323,29 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QuerySetType.model_rebuild(raise_errors=False) + class QueryArrayType(BaseModel): """ QueryArrayType - """ # noqa: E501 + """ # noqa: E501 + sub_type: QueryDataType = Field(alias="subType") type: Literal["array"] __properties: ClassVar[Set[str]] = set(("subType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -388,13 +373,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of sub_type if self.sub_type: - _dict['subType'] = self.sub_type.to_dict() + _dict["subType"] = self.sub_type.to_dict() return _dict @classmethod @@ -406,14 +390,15 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) + # TODO: Rewrite to not use raise_errors QueryArrayType.model_rebuild(raise_errors=False) @@ -421,9 +406,30 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: """ A union of all the types supported by Ontology Query parameters or outputs. """ -QueryDataType = Annotated[Union[AttachmentType, BooleanType, DateType, DoubleType, FloatType, IntegerType, LongType, NullType, OntologyObjectSetType, OntologyObjectType, QueryArrayType, QuerySetType, QueryStructType, QueryUnionType, StringType, ThreeDimensionalAggregation, TimestampType, TwoDimensionalAggregation, UnsupportedType], Field(discriminator="type")] - - +QueryDataType = Annotated[ + Union[ + AttachmentType, + BooleanType, + DateType, + DoubleType, + FloatType, + IntegerType, + LongType, + NullType, + OntologyObjectSetType, + OntologyObjectType, + QueryArrayType, + QuerySetType, + QueryStructType, + QueryUnionType, + StringType, + ThreeDimensionalAggregation, + TimestampType, + TwoDimensionalAggregation, + UnsupportedType, + ], + Field(discriminator="type"), +] # Create an instance of a type adapter. This has a non-trivial overhead according diff --git a/foundry/models/query_parameter_v2.py b/foundry/models/query_parameter_v2.py index a9fd86e52..36c71ac98 100644 --- a/foundry/models/query_parameter_v2.py +++ b/foundry/models/query_parameter_v2.py @@ -38,20 +38,17 @@ from foundry.models.query_data_type import QueryDataType from typing_extensions import Self + class QueryParameterV2(BaseModel): """ Details about a parameter of a query. - """ # noqa: E501 + """ # noqa: E501 + data_type: QueryDataType = Field(alias="dataType") description: Optional[StrictStr] = None __properties: ClassVar[Set[str]] = set(("dataType", "description")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of data_type if self.data_type: - _dict['dataType'] = self.data_type.to_dict() + _dict["dataType"] = self.data_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_type.py b/foundry/models/query_type.py index d4349dede..c37e3f354 100644 --- a/foundry/models/query_type.py +++ b/foundry/models/query_type.py @@ -39,25 +39,30 @@ from foundry.models.parameter import Parameter from typing_extensions import Self + class QueryType(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) output: Optional[OntologyDataType] = None parameters: Optional[Dict[str, Parameter]] = None - rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") - version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " + ) + version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " + ) + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "output", "parameters", "rid", "version") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,20 +90,19 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict['output'] = self.output.to_dict() + _dict["output"] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -110,12 +114,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/query_type_v2.py b/foundry/models/query_type_v2.py index 10e2ed1c0..02d8ef095 100644 --- a/foundry/models/query_type_v2.py +++ b/foundry/models/query_type_v2.py @@ -39,25 +39,30 @@ from foundry.models.query_parameter_v2 import QueryParameterV2 from typing_extensions import Self + class QueryTypeV2(BaseModel): """ Represents a query type in the Ontology. - """ # noqa: E501 + """ # noqa: E501 + api_name: StrictStr = Field(description="The name of the Query in the API. ", alias="apiName") description: Optional[StrictStr] = None - display_name: Optional[StrictStr] = Field(default=None, description="The display name of the entity.", alias="displayName") + display_name: Optional[StrictStr] = Field( + default=None, description="The display name of the entity.", alias="displayName" + ) output: QueryDataType parameters: Optional[Dict[str, QueryParameterV2]] = None - rid: StrictStr = Field(description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. ") - version: StrictStr = Field(description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. ") - __properties: ClassVar[Set[str]] = set(("apiName", "description", "displayName", "output", "parameters", "rid", "version")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + rid: StrictStr = Field( + description="The unique resource identifier of a Function, useful for interacting with other Foundry APIs. " + ) + version: StrictStr = Field( + description="The version of the given Function, written `..-`, where `-` is optional. Examples: `1.2.3`, `1.2.3-rc1`. " + ) + __properties: ClassVar[Set[str]] = set( + ("apiName", "description", "displayName", "output", "parameters", "rid", "version") + ) + + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -85,20 +90,19 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of output if self.output: - _dict['output'] = self.output.to_dict() + _dict["output"] = self.output.to_dict() # override the default output from pydantic by calling `to_dict()` of each value in parameters (dict) _field_dict = {} if self.parameters: for _key in self.parameters: if self.parameters[_key]: _field_dict[_key] = self.parameters[_key].to_dict() - _dict['parameters'] = _field_dict + _dict["parameters"] = _field_dict return _dict @classmethod @@ -110,12 +114,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/release_status.py b/foundry/models/release_status.py index 1df522dfb..a1a993020 100644 --- a/foundry/models/release_status.py +++ b/foundry/models/release_status.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -48,13 +47,11 @@ class ReleaseStatus(str, Enum): """ allowed enum values """ - ACTIVE = 'ACTIVE' - EXPERIMENTAL = 'EXPERIMENTAL' - DEPRECATED = 'DEPRECATED' + ACTIVE = "ACTIVE" + EXPERIMENTAL = "EXPERIMENTAL" + DEPRECATED = "DEPRECATED" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of ReleaseStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/short_type.py b/foundry/models/short_type.py index 22263bac3..a4b8f7d6e 100644 --- a/foundry/models/short_type.py +++ b/foundry/models/short_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class ShortType(BaseModel): """ ShortType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["short"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/string_type.py b/foundry/models/string_type.py index 97732ad2f..4a53d17d2 100644 --- a/foundry/models/string_type.py +++ b/foundry/models/string_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class StringType(BaseModel): """ StringType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["string"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/table_export_format.py b/foundry/models/table_export_format.py index f47ff578b..75e6f213d 100644 --- a/foundry/models/table_export_format.py +++ b/foundry/models/table_export_format.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,18 +41,16 @@ class TableExportFormat(str, Enum): """ - Format for tabular dataset export. + Format for tabular dataset export. """ """ allowed enum values """ - ARROW = 'ARROW' - CSV = 'CSV' + ARROW = "ARROW" + CSV = "CSV" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TableExportFormat from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/three_dimensional_aggregation.py b/foundry/models/three_dimensional_aggregation.py index c688b1934..15966c667 100644 --- a/foundry/models/three_dimensional_aggregation.py +++ b/foundry/models/three_dimensional_aggregation.py @@ -39,21 +39,18 @@ from foundry.models.two_dimensional_aggregation import TwoDimensionalAggregation from typing_extensions import Self + class ThreeDimensionalAggregation(BaseModel): """ ThreeDimensionalAggregation - """ # noqa: E501 + """ # noqa: E501 + key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["threeDimensionalAggregation"] value_type: TwoDimensionalAggregation = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,16 +78,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -102,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/time_series_item_type.py b/foundry/models/time_series_item_type.py index ea15062ad..770ed56bb 100644 --- a/foundry/models/time_series_item_type.py +++ b/foundry/models/time_series_item_type.py @@ -30,6 +30,7 @@ import json import pprint from typing import Union + try: from typing import Annotated except ImportError: @@ -43,15 +44,12 @@ from foundry.models.string_type import StringType - """ A union of the types supported by time series properties. """ TimeSeriesItemType = Annotated[Union[DoubleType, StringType], Field(discriminator="type")] - - # Create an instance of a type adapter. This has a non-trivial overhead according # to the documentation so we do this once. This also forces us to validate the # correctness of the discriminator. diff --git a/foundry/models/timeseries_type.py b/foundry/models/timeseries_type.py index 415e94abd..64e0ce21e 100644 --- a/foundry/models/timeseries_type.py +++ b/foundry/models/timeseries_type.py @@ -38,20 +38,17 @@ from foundry.models.time_series_item_type import TimeSeriesItemType from typing_extensions import Self + class TimeseriesType(BaseModel): """ TimeseriesType - """ # noqa: E501 + """ # noqa: E501 + item_type: TimeSeriesItemType = Field(alias="itemType") type: Literal["timeseries"] __properties: ClassVar[Set[str]] = set(("itemType", "type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -79,13 +76,12 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of item_type if self.item_type: - _dict['itemType'] = self.item_type.to_dict() + _dict["itemType"] = self.item_type.to_dict() return _dict @classmethod @@ -97,12 +93,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/timestamp_type.py b/foundry/models/timestamp_type.py index dbfe8299c..e4ab4bb47 100644 --- a/foundry/models/timestamp_type.py +++ b/foundry/models/timestamp_type.py @@ -36,19 +36,16 @@ from pydantic import BaseModel, StrictStr from typing_extensions import Self + class TimestampType(BaseModel): """ TimestampType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["timestamp"] __properties: ClassVar[Set[str]] = set(("type")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -76,8 +73,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -91,12 +87,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction.py b/foundry/models/transaction.py index 60f3ccd3b..b66b14361 100644 --- a/foundry/models/transaction.py +++ b/foundry/models/transaction.py @@ -39,23 +39,31 @@ from foundry.models.transaction_type import TransactionType from typing_extensions import Self + class Transaction(BaseModel): """ - An operation that modifies the files within a dataset. - """ # noqa: E501 - closed_time: Optional[datetime] = Field(default=None, description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", alias="closedTime") - created_time: datetime = Field(description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", alias="createdTime") - rid: StrictStr = Field(description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. ") + An operation that modifies the files within a dataset. + """ # noqa: E501 + + closed_time: Optional[datetime] = Field( + default=None, + description="The timestamp when the transaction was closed, in ISO 8601 timestamp format.", + alias="closedTime", + ) + created_time: datetime = Field( + description="The timestamp when the transaction was created, in ISO 8601 timestamp format.", + alias="createdTime", + ) + rid: StrictStr = Field( + description="The Resource Identifier (RID) of a Transaction. Example: `ri.foundry.main.transaction.0a0207cb-26b7-415b-bc80-66a3aa3933f4`. " + ) status: TransactionStatus transaction_type: TransactionType = Field(alias="transactionType") - __properties: ClassVar[Set[str]] = set(("closedTime", "createdTime", "rid", "status", "transactionType")) - - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } + __properties: ClassVar[Set[str]] = set( + ("closedTime", "createdTime", "rid", "status", "transactionType") + ) + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -83,8 +91,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -98,12 +105,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/transaction_status.py b/foundry/models/transaction_status.py index feb53c84e..c8790b6e3 100644 --- a/foundry/models/transaction_status.py +++ b/foundry/models/transaction_status.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,19 +41,17 @@ class TransactionStatus(str, Enum): """ - The status of a Transaction. + The status of a Transaction. """ """ allowed enum values """ - ABORTED = 'ABORTED' - COMMITTED = 'COMMITTED' - OPEN = 'OPEN' + ABORTED = "ABORTED" + COMMITTED = "COMMITTED" + OPEN = "OPEN" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionStatus from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/transaction_type.py b/foundry/models/transaction_type.py index 26b0bb8e9..4bedfadc0 100644 --- a/foundry/models/transaction_type.py +++ b/foundry/models/transaction_type.py @@ -33,7 +33,6 @@ from enum import Enum - try: from typing import Self except ImportError: @@ -42,20 +41,18 @@ class TransactionType(str, Enum): """ - The type of a Transaction. + The type of a Transaction. """ """ allowed enum values """ - APPEND = 'APPEND' - UPDATE = 'UPDATE' - SNAPSHOT = 'SNAPSHOT' - DELETE = 'DELETE' + APPEND = "APPEND" + UPDATE = "UPDATE" + SNAPSHOT = "SNAPSHOT" + DELETE = "DELETE" @classmethod def from_json(cls, json_str: str) -> Self: """Create an instance of TransactionType from a JSON string""" return cls(json.loads(json_str)) - - diff --git a/foundry/models/two_dimensional_aggregation.py b/foundry/models/two_dimensional_aggregation.py index aca1dd877..3d7e8328c 100644 --- a/foundry/models/two_dimensional_aggregation.py +++ b/foundry/models/two_dimensional_aggregation.py @@ -39,21 +39,18 @@ from foundry.models.query_aggregation_value_type import QueryAggregationValueType from typing_extensions import Self + class TwoDimensionalAggregation(BaseModel): """ TwoDimensionalAggregation - """ # noqa: E501 + """ # noqa: E501 + key_type: QueryAggregationKeyType = Field(alias="keyType") type: Literal["twoDimensionalAggregation"] value_type: QueryAggregationValueType = Field(alias="valueType") __properties: ClassVar[Set[str]] = set(("keyType", "type", "valueType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -81,16 +78,15 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) # override the default output from pydantic by calling `to_dict()` of key_type if self.key_type: - _dict['keyType'] = self.key_type.to_dict() + _dict["keyType"] = self.key_type.to_dict() # override the default output from pydantic by calling `to_dict()` of value_type if self.value_type: - _dict['valueType'] = self.value_type.to_dict() + _dict["valueType"] = self.value_type.to_dict() return _dict @classmethod @@ -102,12 +98,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/foundry/models/unsupported_type.py b/foundry/models/unsupported_type.py index 770c3217d..c816a5ae6 100644 --- a/foundry/models/unsupported_type.py +++ b/foundry/models/unsupported_type.py @@ -37,20 +37,17 @@ from pydantic import Field from typing_extensions import Self + class UnsupportedType(BaseModel): """ UnsupportedType - """ # noqa: E501 + """ # noqa: E501 + type: Literal["unsupported"] unsupported_type: Literal["unsupported"] = Field(alias="unsupportedType") __properties: ClassVar[Set[str]] = set(("type", "unsupportedType")) - model_config = { - "populate_by_name": True, - "validate_assignment": True, - "extra": "forbid" - } - + model_config = {"populate_by_name": True, "validate_assignment": True, "extra": "forbid"} def to_str(self) -> str: """Returns the string representation of the model using alias""" @@ -78,8 +75,7 @@ def to_dict(self) -> Dict[str, Any]: """ _dict = self.model_dump( by_alias=True, - exclude={ - }, + exclude={}, exclude_none=True, ) return _dict @@ -93,12 +89,10 @@ def from_dict(cls, obj: Dict, *, allow_extra=False) -> Self: # We need to do this since the model config forbids additional properties # and this cannot be changed at runtime if ( - allow_extra and - isinstance(obj, dict) and - any(key not in cls.__properties for key in obj) + allow_extra + and isinstance(obj, dict) + and any(key not in cls.__properties for key in obj) ): obj = {key: value for key, value in obj.items() if key in cls.__properties} return cls.model_validate(obj) - - diff --git a/test/__init__.py b/test/__init__.py index 2b4e3a13f..490e9ab88 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -11,4 +11,3 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - diff --git a/test/api/test_datasets_api_service_api.py b/test/api/test_datasets_api_service_api.py index ebf64b51c..b5d39c501 100644 --- a/test/api/test_datasets_api_service_api.py +++ b/test/api/test_datasets_api_service_api.py @@ -16,7 +16,6 @@ from unittest.mock import Mock from pydantic import ValidationError import pytest -from urllib3 import PoolManager from foundry import FoundryClient from foundry.models.branch import Branch from foundry.models.create_branch_request import CreateBranchRequest @@ -33,11 +32,13 @@ def mock_create_branch(monkeypatch, dataset_rid: str, branch_id: str): { "method": "POST", "url": f"https://test.com/api/v1/datasets/{dataset_rid}/branches", - "body": {"branchId": branch_id}, + "json": {"branchId": branch_id}, + "params": {}, }, { "status": 200, - "body": {"branchId": branch_id}, + "json": {"branchId": branch_id}, + "content": None, }, ) ], @@ -139,11 +140,14 @@ def mock_data_read(monkeypatch, data: bytes): ( { "method": "GET", - "url": "https://test.com/api/v1/datasets/test.rid/readTable?format=CSV", + "url": "https://test.com/api/v1/datasets/test.rid/readTable", + "params": {"format": "CSV"}, + "json": None, }, { "status": 200, - "data": data, + "json": None, + "content": data, }, ) ], @@ -158,7 +162,5 @@ def test_read_table_can_pass_in_str(client: FoundryClient, monkeypatch): def test_read_table_can_pass_enum(client: FoundryClient, monkeypatch): mock_data_read(monkeypatch, data=b"hello") - res = client.datasets.read_table( - format=TableExportFormat.CSV, dataset_rid="test.rid" - ) + res = client.datasets.read_table(format=TableExportFormat.CSV, dataset_rid="test.rid") assert res == b"hello" diff --git a/test/api/test_ontologies_api_service_api.py b/test/api/test_ontologies_api_service_api.py index 5bfc2874c..65a8067ad 100644 --- a/test/api/test_ontologies_api_service_api.py +++ b/test/api/test_ontologies_api_service_api.py @@ -28,13 +28,16 @@ def mock_list_ontologies(monkeypatch): { "method": "GET", "url": "https://test.com/api/v1/ontologies/MyOntology/objectTypes", + "json": None, + "params": None, }, { "status": 200, - "body": { + "json": { "nextPageToken": None, "data": [{"rid": "123", "apiName": "API", "status": "ACTIVE"}], }, + "content": None, }, ) ], diff --git a/test/api/test_ontologies_v2_api_service_api.py b/test/api/test_ontologies_v2_api_service_api.py index ebed7c38f..b211cac01 100644 --- a/test/api/test_ontologies_v2_api_service_api.py +++ b/test/api/test_ontologies_v2_api_service_api.py @@ -29,10 +29,12 @@ def mock_list_ontologies(monkeypatch): { "method": "GET", "url": "https://test.com/api/v2/ontologies/MyOntology/objectTypes", + "json": None, + "params": None, }, { "status": 200, - "body": { + "json": { "nextPageToken": None, "data": [ { @@ -43,6 +45,7 @@ def mock_list_ontologies(monkeypatch): } ], }, + "content": None, }, ) ], diff --git a/test/models/test_create_dataset_request.py b/test/models/test_create_dataset_request.py index 19bbe2168..3a9cfb12b 100644 --- a/test/models/test_create_dataset_request.py +++ b/test/models/test_create_dataset_request.py @@ -39,9 +39,7 @@ def test_to_dict(): def test_from_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest.from_dict( - {"name": "FOLDER_NAME", "parentFolderRid": 123} - ), + lambda: CreateDatasetRequest.from_dict({"name": "FOLDER_NAME", "parentFolderRid": 123}), ) @@ -55,7 +53,5 @@ def test_from_fails_missing(): def test_init_fails_bad_type(): assert pytest.raises( ValidationError, - lambda: CreateDatasetRequest( - name="FOLDER_NAME", parentFolderRid=123 # type: ignore - ), + lambda: CreateDatasetRequest(name="FOLDER_NAME", parentFolderRid=123), # type: ignore ) diff --git a/test/test_api_client.py b/test/test_api_client.py index 3d64e75c0..6cb8ac8f9 100644 --- a/test/test_api_client.py +++ b/test/test_api_client.py @@ -59,12 +59,12 @@ def test_user_agent(): ) client.session.request.assert_called_with( - ANY, - ANY, + method="POST", + url="https://foo/api/abc", headers={"User-Agent": f"foundry-platform-sdk/{__version__}"}, - body=ANY, - post_params=ANY, - _request_timeout=ANY, + json=ANY, + params=ANY, + stream=False, ) @@ -106,10 +106,6 @@ def test_call_api_400(): assert info.value.name == "ERROR_NAME" assert info.value.error_instance_id == "123" assert info.value.parameters == {} - assert ( - str(info.value) - == f"(400)\nReason: None\nHTTP response headers: Header: A\nHTTP response body: {EXAMPLE_ERROR}\n" - ) def test_call_api_401(): diff --git a/test/test_exceptions.py b/test/test_exceptions.py index 2335fb256..2f313d32b 100644 --- a/test/test_exceptions.py +++ b/test/test_exceptions.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import json import re import pytest from foundry._errors.sdk_internal_error import SDKInternalError @@ -35,6 +36,7 @@ def test_sdk_internal_error(): OpenAPI Generator Version: \d+\.\d+\.\d+ Pydantic Version: \d+\.\d+\.\d+ Pydantic Core Version: \d+\.\d+\.\d+ +Requests Version: \d+\.\d+\.\d+ $""", str(error.value), ) @@ -56,9 +58,16 @@ def raises_unknown_exception(): def test_handle_unexpected_ignores_known_exception(): @handle_unexpected def raises_known_exception(): - raise PalantirRPCException("test") + raise PalantirRPCException({"errorName": "", "parameters": "", "errorInstanceId": ""}) with pytest.raises(PalantirRPCException) as error: raises_known_exception() - assert str(error.value) == "test" + assert str(error.value) == json.dumps( + { + "errorInstanceId": "", + "errorName": "", + "parameters": "", + }, + indent=4, + ) diff --git a/test/utils.py b/test/utils.py index ca2117f89..f6cc304fe 100644 --- a/test/utils.py +++ b/test/utils.py @@ -13,6 +13,7 @@ # limitations under the License. import json as jsn +from typing import Any, Dict, List, Optional, Tuple, TypedDict from unittest.mock import Mock import pytest @@ -27,7 +28,20 @@ def client(): yield FoundryClient(auth=UserTokenAuth(hostname="test.com", token="test"), hostname="test.com") -def mock_responses(monkeypatch, request_responses: list): +class MockRequest(TypedDict): + method: str + url: str + params: Optional[Dict[str, Any]] + json: Optional[Any] + + +class MockResponse(TypedDict): + status: int + content: Optional[bytes] + json: Optional[Any] + + +def mock_responses(monkeypatch, request_responses: List[Tuple[MockRequest, MockResponse]]): # Define a side_effect function for our mock. This will be called instead of the original method def mock_request(_, method, url, json=None, **kwargs): for request, response in request_responses: @@ -37,17 +51,17 @@ def mock_request(_, method, url, json=None, **kwargs): if request["url"] != url: continue - if json is not None and json != request["body"]: + if json is not None and json != request["json"]: continue # Mock response mock_response = Mock() mock_response.status_code = response["status"] - if "body" in response: - mock_response.content = jsn.dumps(response["body"]).encode() - elif "data" in response: - mock_response.content = response["data"] + if response["json"]: + mock_response.content = jsn.dumps(response["json"]).encode() + elif response["content"]: + mock_response.content = response["content"] else: mock_response.content = None diff --git a/tox.ini b/tox.ini index d584d1d0d..65eddd14b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-urllib3{1.26.5,1.26,2.0,2.1}, pylint, mypy, black +envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.0,2.10,2.20,2.31}, pylint, mypy, black [testenv] deps = @@ -13,10 +13,10 @@ deps = pydantic{2.3}: pydantic==2.3.* pydantic{2.4}: pydantic==2.4.* pydantic{2.5}: pydantic==2.5.* - urllib3{1.26.5}: urllib3==1.26.5 - urllib3{1.26}: urllib3==1.26.* - urllib3{2.0}: urllib3==2.0.* - urllib3{2.1}: urllib3==2.1.* + requests{2.0}: requests==2.0.* + requests{2.10}: requests==2.10.* + requests{2.20}: requests==2.20.* + requests{2.31}: requests==2.31.* commands = pytest test/ From 01d7159a805260a214e981feaf54086045fbeaeb Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:43:36 -0400 Subject: [PATCH 07/22] refactor --- .circleci/config.yml | 6 +++--- tox.ini | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d933627a..1c491d0b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,7 +59,7 @@ workflows: parameters: python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] pydantic_version: ["2.4"] - requests_version: ["2.1"] + requests_version: ["2.31"] - test: <<: *always-run name: pydantic-<< matrix.pydantic_version >> @@ -67,7 +67,7 @@ workflows: parameters: python_version: ["3.12"] pydantic_version: ["2.1.0", "2.1", "2.2", "2.3", "2.4", "2.5"] - requests_version: ["2.1"] + requests_version: ["2.31"] - test: <<: *always-run name: requests-<< matrix.requests_version >> @@ -75,7 +75,7 @@ workflows: parameters: python_version: ["3.12"] pydantic_version: ["2.4"] - requests_version: ["2.0", "2.10", "2.20", "2.31"] + requests_version: ["2.22", "2.24", "2.26", "2.31"] - pyright: <<: *always-run - black: diff --git a/tox.ini b/tox.ini index 65eddd14b..d8d05b99a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.0,2.10,2.20,2.31}, pylint, mypy, black +envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.22,2.24,2.26,2.31}, pylint, mypy, black [testenv] deps = @@ -13,9 +13,9 @@ deps = pydantic{2.3}: pydantic==2.3.* pydantic{2.4}: pydantic==2.4.* pydantic{2.5}: pydantic==2.5.* - requests{2.0}: requests==2.0.* - requests{2.10}: requests==2.10.* requests{2.20}: requests==2.20.* + requests{2.22}: requests==2.22.* + requests{2.24}: requests==2.24.* requests{2.31}: requests==2.31.* commands = pytest test/ From 2eb02f5756ebdcb803d5bbb1790328323e961c55 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:47:21 -0400 Subject: [PATCH 08/22] refactor --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d8d05b99a..3ac9a7eec 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ deps = pydantic{2.3}: pydantic==2.3.* pydantic{2.4}: pydantic==2.4.* pydantic{2.5}: pydantic==2.5.* - requests{2.20}: requests==2.20.* requests{2.22}: requests==2.22.* requests{2.24}: requests==2.24.* + requests{2.26}: requests==2.26.* requests{2.31}: requests==2.31.* commands = pytest test/ From aded7f87700aca65b93369c2958f8cb3baa570fd Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:49:05 -0400 Subject: [PATCH 09/22] refactor --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1c491d0b3..81268d31e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,9 +95,9 @@ workflows: - pydantic-2.4 - pydantic-2.5 - - requests-2.0 - - requests-2.10 - - requests-2.20 + - requests-2.22 + - requests-2.24 + - requests-2.26 - requests-2.31 - pyright From fccc49b59dc71f03b4cd51d028b6a804d43d18cf Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:52:27 -0400 Subject: [PATCH 10/22] refactor --- .circleci/config.yml | 5 ++--- foundry/_core/oauth_utils.py | 3 ++- tox.ini | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 81268d31e..3c72d277b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,7 +75,7 @@ workflows: parameters: python_version: ["3.12"] pydantic_version: ["2.4"] - requests_version: ["2.22", "2.24", "2.26", "2.31"] + requests_version: ["2.25", "2.26", "2.31"] - pyright: <<: *always-run - black: @@ -95,8 +95,7 @@ workflows: - pydantic-2.4 - pydantic-2.5 - - requests-2.22 - - requests-2.24 + - requests-2.25 - requests-2.26 - requests-2.31 diff --git a/foundry/_core/oauth_utils.py b/foundry/_core/oauth_utils.py index f33aff6b7..cfccb16d1 100644 --- a/foundry/_core/oauth_utils.py +++ b/foundry/_core/oauth_utils.py @@ -20,6 +20,7 @@ from urllib.parse import urlencode from typing import Optional +from typing import List import requests from pydantic import BaseModel @@ -116,7 +117,7 @@ def __init__( client_secret: str, url: str, multipass_context_path: Optional[str] = None, - scopes: Optional[list[str]] = None, + scopes: Optional[List[str]] = None, ): self._client_id = client_id self._client_secret = client_secret diff --git a/tox.ini b/tox.ini index 3ac9a7eec..f536bb57c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.22,2.24,2.26,2.31}, pylint, mypy, black +envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.25,2.26,2.31}, pylint, mypy, black [testenv] deps = @@ -13,8 +13,7 @@ deps = pydantic{2.3}: pydantic==2.3.* pydantic{2.4}: pydantic==2.4.* pydantic{2.5}: pydantic==2.5.* - requests{2.22}: requests==2.22.* - requests{2.24}: requests==2.24.* + requests{2.25}: requests==2.25.* requests{2.26}: requests==2.26.* requests{2.31}: requests==2.31.* commands = From f2474eeae86040548373e2efd22b23514218f24f Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 15:57:20 -0400 Subject: [PATCH 11/22] refactor --- foundry/_core/oauth_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foundry/_core/oauth_utils.py b/foundry/_core/oauth_utils.py index cfccb16d1..399af1a2b 100644 --- a/foundry/_core/oauth_utils.py +++ b/foundry/_core/oauth_utils.py @@ -159,7 +159,7 @@ def revoke_token(self, access_token: str) -> None: revoke_token_response = requests.post(token_url, data=body) revoke_token_response.raise_for_status() - def get_scopes(self) -> list[str]: + def get_scopes(self) -> List[str]: scopes = [] if self.scopes: scopes.extend(self.scopes) @@ -190,7 +190,7 @@ def __init__( redirect_url: str, url: str, multipass_context_path: Optional[str] = None, - scopes: Optional[list[str]] = None, + scopes: Optional[List[str]] = None, ): self._client_id = client_id self._redirect_url = redirect_url @@ -272,7 +272,7 @@ def revoke_token(self, access_token: str) -> None: revoke_token_response = requests.post(token_url, data=body) revoke_token_response.raise_for_status() - def get_scopes(self) -> list[str]: + def get_scopes(self) -> List[str]: scopes = [] if self.scopes: scopes.extend(self.scopes) From 7310ef191b1e7fa674beecbc5cc0517b40f6a0aa Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Tue, 23 Jan 2024 16:15:56 -0400 Subject: [PATCH 12/22] refactor --- .circleci/config.yml | 3 +-- pyproject.toml | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c72d277b..339d12aa3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -57,7 +57,7 @@ workflows: name: python-<< matrix.python_version>> matrix: parameters: - python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python_version: ["3.9", "3.10", "3.11", "3.12"] pydantic_version: ["2.4"] requests_version: ["2.31"] - test: @@ -82,7 +82,6 @@ workflows: <<: *always-run - publish: requires: - - python-3.8 - python-3.9 - python-3.10 - python-3.11 diff --git a/pyproject.toml b/pyproject.toml index 6097a9e9c..a8d91a3fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Palantir OpenAPI"] packages = [{ include = "foundry" }] [tool.poetry.dependencies] -python = "^3.8" +python = "^3.9" requests = "^2.0.0" python-dateutil = "*" pydantic = "^2.1.0" diff --git a/tox.ini b/tox.ini index f536bb57c..ec27f20f1 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py{38,39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.25,2.26,2.31}, pylint, mypy, black +envlist = py{39,310,311,312}-pydantic{2.1.0,2.1,2.2,2.3,2.4,2.5}-requests{2.25,2.26,2.31}, pylint, mypy, black [testenv] deps = From 195f503cf472becf782dd7d8a546dc6697f8d4e3 Mon Sep 17 00:00:00 2001 From: svc-changelog Date: Tue, 23 Jan 2024 20:23:33 +0000 Subject: [PATCH 13/22] Add generated changelog entries --- changelog/@unreleased/pr-3.v2.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/@unreleased/pr-3.v2.yml diff --git a/changelog/@unreleased/pr-3.v2.yml b/changelog/@unreleased/pr-3.v2.yml new file mode 100644 index 000000000..75fe52d19 --- /dev/null +++ b/changelog/@unreleased/pr-3.v2.yml @@ -0,0 +1,5 @@ +type: feature +feature: + description: Set initial version + links: + - https://github.com/palantir/foundry-platform-python/pull/3 From c077e7d66096bbb3741eddb1c731653928428c5f Mon Sep 17 00:00:00 2001 From: Jacob Date: Tue, 23 Jan 2024 16:24:20 -0400 Subject: [PATCH 14/22] Update pr-3.v2.yml --- changelog/@unreleased/pr-3.v2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/@unreleased/pr-3.v2.yml b/changelog/@unreleased/pr-3.v2.yml index 75fe52d19..33157458b 100644 --- a/changelog/@unreleased/pr-3.v2.yml +++ b/changelog/@unreleased/pr-3.v2.yml @@ -1,5 +1,5 @@ type: feature feature: - description: Set initial version + description: Initial release of the Foundry Python Platform SDK links: - https://github.com/palantir/foundry-platform-python/pull/3 From b11834f7a3d19c46abfe0a0bbd2c818bbdd908a2 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 05:54:28 -0400 Subject: [PATCH 15/22] refactor --- .circleci/config.yml | 9 ++++++++- changelog/@unreleased/pr-3.v2.yml | 5 ----- test/test_docs.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 changelog/@unreleased/pr-3.v2.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index 339d12aa3..935a10278 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,6 +39,10 @@ jobs: - run: pip install --user tox - run: python -m tox -e black + all-checks: + steps: + - run: echo "Done!" + publish: docker: - image: cimg/python:3.12 @@ -80,7 +84,7 @@ workflows: <<: *always-run - black: <<: *always-run - - publish: + - all-checks: requires: - python-3.9 - python-3.10 @@ -100,6 +104,9 @@ workflows: - pyright - black + - publish: + requires: + - all-checks filters: tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } branches: { ignore: /.*/ } diff --git a/changelog/@unreleased/pr-3.v2.yml b/changelog/@unreleased/pr-3.v2.yml deleted file mode 100644 index 33157458b..000000000 --- a/changelog/@unreleased/pr-3.v2.yml +++ /dev/null @@ -1,5 +0,0 @@ -type: feature -feature: - description: Initial release of the Foundry Python Platform SDK - links: - - https://github.com/palantir/foundry-platform-python/pull/3 diff --git a/test/test_docs.py b/test/test_docs.py index 9e16b5561..a3c79f863 100644 --- a/test/test_docs.py +++ b/test/test_docs.py @@ -19,7 +19,7 @@ def test_no_remaining_references(): try: # If this works, it means we are in the generator repository - from foundry_platform_sdk_generator.config import Config + from foundry_sdk_generator.config import Config config = Config.load_config() docs_path = config.docs_path From 840af1ce6dd478be009fa689dd2376ca4097e44a Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 05:55:06 -0400 Subject: [PATCH 16/22] refactor --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 935a10278..0f25ae0d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,6 +85,7 @@ workflows: - black: <<: *always-run - all-checks: + <<: *always-run requires: - python-3.9 - python-3.10 From 577565448a1b9f4931f6e283aed103bf6b8532d6 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 05:57:45 -0400 Subject: [PATCH 17/22] refactor --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f25ae0d3..28640a58c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,6 +40,8 @@ jobs: - run: python -m tox -e black all-checks: + docker: + - image: node:lts steps: - run: echo "Done!" From 8c50bc029f48549f7cdf68c49cd698d6c050fb3b Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 06:40:46 -0400 Subject: [PATCH 18/22] refactor --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 28640a58c..f6fa3365b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,7 +39,7 @@ jobs: - run: pip install --user tox - run: python -m tox -e black - all-checks: + circle-all: docker: - image: node:lts steps: @@ -86,7 +86,7 @@ workflows: <<: *always-run - black: <<: *always-run - - all-checks: + - circle-all: <<: *always-run requires: - python-3.9 @@ -109,7 +109,7 @@ workflows: - black - publish: requires: - - all-checks + - circle-all filters: tags: { only: '/^[0-9]+(\.[0-9]+)+(-[a-zA-Z]+[0-9]*)*$/' } branches: { ignore: /.*/ } From 6d031e66fe3ab7b3fbc25f09a475c218c7ef0f69 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 07:28:23 -0400 Subject: [PATCH 19/22] refactor --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a8d91a3fb..b7bed6b25 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ packages = [{ include = "foundry" }] [tool.poetry.dependencies] python = "^3.9" -requests = "^2.0.0" +requests = "^2.25.0" python-dateutil = "*" pydantic = "^2.1.0" typing-extensions = ">=4.7.1" From 633ee7489e4ce9fbcaff7fe43953d560d4f251c5 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 07:32:55 -0400 Subject: [PATCH 20/22] adding back changelog --- changelog/@unreleased/pr-3.v2.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/@unreleased/pr-3.v2.yml diff --git a/changelog/@unreleased/pr-3.v2.yml b/changelog/@unreleased/pr-3.v2.yml new file mode 100644 index 000000000..7d6bb7397 --- /dev/null +++ b/changelog/@unreleased/pr-3.v2.yml @@ -0,0 +1,5 @@ +type: feature +feature: + description: Initial release of the Foundry Python Platform SDK + links: + - https://github.com/palantir/foundry-platform-python/pull/3 \ No newline at end of file From 3b7db1a31f7851fe4e738b8a5ebec756458d34d1 Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 10:38:26 -0400 Subject: [PATCH 21/22] force --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 238b5f0f6..eecefa821 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Foundry Platform SDK -![PyPI - Python Version](https://img.shields.io/pypi/pyversions/foundry-platform-sdk) -[![PyPI](https://img.shields.io/pypi/v/foundry-platform-sdk)](https://pypi.org/project/foundry-platform-sdk/) +![Supported Python Versions](https://img.shields.io/pypi/pyversions/foundry-platform-sdk) +[![PyPI Version](https://img.shields.io/pypi/v/foundry-platform-sdk)](https://pypi.org/project/foundry-platform-sdk/) [![License](https://img.shields.io/badge/License-Apache%202.0-lightgrey.svg)](https://opensource.org/licenses/Apache-2.0) > [!WARNING] From f75492e0889a476bfec0fc68b3db57343ac51cbb Mon Sep 17 00:00:00 2001 From: Jacob Smith Date: Wed, 24 Jan 2024 14:20:10 -0400 Subject: [PATCH 22/22] fix --- foundry/_core/foundry_token_auth_client.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/foundry/_core/foundry_token_auth_client.py b/foundry/_core/foundry_token_auth_client.py index 3453ed0d0..516a6ed6f 100644 --- a/foundry/_core/foundry_token_auth_client.py +++ b/foundry/_core/foundry_token_auth_client.py @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# (c) Copyright 2023 Palantir Technologies Inc. All rights reserved. - import os from typing import Tuple, TypeVar, Callable