From fc88b920e9a89c42b2d8ee294401a8f40b0d15e9 Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Wed, 15 Oct 2025 22:44:23 +0000 Subject: [PATCH 1/6] new public api --- spec/public-api.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/public-api.yaml b/spec/public-api.yaml index 197e1fac..d3e8360c 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -1859,6 +1859,13 @@ components: - CHANGED_TO - NO_CHANGE - NO_QUERIES + BoundingBoxLabelEnum: + type: string + enum: + - NO_OBJECTS + - BOUNDING_BOX + - GREATER_THAN_MAX + - UNCLEAR Source: type: string enum: From 8a2cf58bd906e235cef7d6abd8dae7cddf8584e8 Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Wed, 15 Oct 2025 22:44:34 +0000 Subject: [PATCH 2/6] regenerate --- generated/.openapi-generator/FILES | 3 + generated/README.md | 1 + generated/docs/BoundingBoxLabelEnum.md | 11 + .../api/actions_api.py | 564 ++++++++----- .../api/detector_groups_api.py | 200 +++-- .../api/detector_reset_api.py | 105 ++- .../api/detectors_api.py | 741 ++++++++++++------ .../api/edge_api.py | 195 +++-- .../api/image_queries_api.py | 519 +++++++----- .../api/labels_api.py | 110 ++- .../api/month_to_date_account_info_api.py | 94 ++- .../api/notes_api.py | 219 ++++-- .../api/user_api.py | 94 ++- .../groundlight_openapi_client/api_client.py | 556 ++++++------- .../apis/__init__.py | 1 + .../configuration.py | 266 +++---- .../groundlight_openapi_client/exceptions.py | 17 +- .../model/account_month_to_date_info.py | 131 ++-- .../model/action.py | 104 ++- .../model/action_list.py | 67 +- .../model/all_notes.py | 100 +-- .../model/annotations_requested_enum.py | 68 +- .../model/b_box_geometry.py | 115 ++- .../model/b_box_geometry_request.py | 106 ++- .../model/binary_classification_result.py | 117 ++- .../model/blank_enum.py | 66 +- .../model/bounding_box_label_enum.py | 285 +++++++ .../model/bounding_box_mode_configuration.py | 101 ++- .../model/bounding_box_result.py | 117 ++- .../model/channel_enum.py | 68 +- .../model/condition.py | 98 +-- .../model/condition_request.py | 98 +-- .../model/count_mode_configuration.py | 101 ++- .../model/counting_result.py | 128 ++- .../model/detector.py | 204 ++--- .../model/detector_creation_input_request.py | 196 ++--- .../model/detector_group.py | 98 +-- .../model/detector_group_request.py | 97 +-- .../model/detector_type_enum.py | 66 +- .../model/edge_model_info.py | 148 ++-- .../model/escalation_type_enum.py | 68 +- .../model/image_query.py | 234 ++---- .../model/image_query_type_enum.py | 66 +- .../model/inline_response200.py | 96 +-- .../model/inline_response2001.py | 100 +-- .../inline_response2001_evaluation_results.py | 217 ++--- .../model/inline_response2002.py | 94 +-- .../model/inline_response200_summary.py | 118 ++- ...inline_response200_summary_class_counts.py | 110 ++- .../groundlight_openapi_client/model/label.py | 70 +- .../model/label_value.py | 154 ++-- .../model/label_value_request.py | 111 ++- .../model/mode_enum.py | 74 +- .../model/multi_class_mode_configuration.py | 98 +-- .../model/multi_classification_result.py | 117 ++- .../groundlight_openapi_client/model/note.py | 107 ++- .../model/note_request.py | 111 ++- .../model/paginated_detector_list.py | 114 ++- .../model/paginated_image_query_list.py | 114 ++- .../model/paginated_rule_list.py | 114 ++- .../model/patched_detector_request.py | 143 ++-- .../model/payload_template.py | 101 +-- .../model/payload_template_request.py | 102 +-- .../model/result_type_enum.py | 74 +- .../groundlight_openapi_client/model/roi.py | 103 ++- .../model/roi_request.py | 101 +-- .../groundlight_openapi_client/model/rule.py | 176 ++--- .../model/rule_request.py | 163 ++-- .../model/snooze_time_unit_enum.py | 72 +- .../model/source.py | 82 +- .../model/source_enum.py | 86 +- .../model/status_enum.py | 68 +- .../model/text_mode_configuration.py | 97 +-- .../model/text_recognition_result.py | 124 ++- .../model/verb_enum.py | 74 +- .../model/webhook_action.py | 133 ++-- .../model/webhook_action_request.py | 135 ++-- .../groundlight_openapi_client/model_utils.py | 690 +++++++++------- .../models/__init__.py | 1 + generated/groundlight_openapi_client/rest.py | 312 +++----- generated/setup.py | 7 +- .../test/test_bounding_box_label_enum.py | 36 + 82 files changed, 5924 insertions(+), 5618 deletions(-) create mode 100644 generated/docs/BoundingBoxLabelEnum.md create mode 100644 generated/groundlight_openapi_client/model/bounding_box_label_enum.py create mode 100644 generated/test/test_bounding_box_label_enum.py diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 4d99e803..76a4b875 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -10,6 +10,7 @@ docs/BBoxGeometry.md docs/BBoxGeometryRequest.md docs/BinaryClassificationResult.md docs/BlankEnum.md +docs/BoundingBoxLabelEnum.md docs/BoundingBoxModeConfiguration.md docs/BoundingBoxResult.md docs/ChannelEnum.md @@ -96,6 +97,7 @@ groundlight_openapi_client/model/b_box_geometry.py groundlight_openapi_client/model/b_box_geometry_request.py groundlight_openapi_client/model/binary_classification_result.py groundlight_openapi_client/model/blank_enum.py +groundlight_openapi_client/model/bounding_box_label_enum.py groundlight_openapi_client/model/bounding_box_mode_configuration.py groundlight_openapi_client/model/bounding_box_result.py groundlight_openapi_client/model/channel_enum.py @@ -154,4 +156,5 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_bounding_box_label_enum.py tox.ini diff --git a/generated/README.md b/generated/README.md index acfcaec1..e21f5848 100644 --- a/generated/README.md +++ b/generated/README.md @@ -154,6 +154,7 @@ Class | Method | HTTP request | Description - [BBoxGeometryRequest](docs/BBoxGeometryRequest.md) - [BinaryClassificationResult](docs/BinaryClassificationResult.md) - [BlankEnum](docs/BlankEnum.md) + - [BoundingBoxLabelEnum](docs/BoundingBoxLabelEnum.md) - [BoundingBoxModeConfiguration](docs/BoundingBoxModeConfiguration.md) - [BoundingBoxResult](docs/BoundingBoxResult.md) - [ChannelEnum](docs/ChannelEnum.md) diff --git a/generated/docs/BoundingBoxLabelEnum.md b/generated/docs/BoundingBoxLabelEnum.md new file mode 100644 index 00000000..1cbd7e80 --- /dev/null +++ b/generated/docs/BoundingBoxLabelEnum.md @@ -0,0 +1,11 @@ +# BoundingBoxLabelEnum + + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | must be one of ["NO_OBJECTS", "BOUNDING_BOX", "GREATER_THAN_MAX", "UNCLEAR", ] + +[[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/generated/groundlight_openapi_client/api/actions_api.py b/generated/groundlight_openapi_client/api/actions_api.py index b4d3ebd2..69adca06 100644 --- a/generated/groundlight_openapi_client/api/actions_api.py +++ b/generated/groundlight_openapi_client/api/actions_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList from groundlight_openapi_client.model.rule import Rule @@ -39,224 +40,291 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_rule_endpoint = _Endpoint( settings={ - "response_type": (Rule,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/actions/detector/{detector_id}/rules", - "operation_id": "create_rule", - "http_method": "POST", - "servers": None, + 'response_type': (Rule,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/actions/detector/{detector_id}/rules', + 'operation_id': 'create_rule', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "rule_request", + 'all': [ + 'detector_id', + 'rule_request', + ], + 'required': [ + 'detector_id', + 'rule_request', ], - "required": [ - "detector_id", - "rule_request", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "rule_request": (RuleRequest,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "detector_id": "detector_id", + 'openapi_types': { + 'detector_id': + (str,), + 'rule_request': + (RuleRequest,), }, - "location_map": { - "detector_id": "path", - "rule_request": "body", + 'attribute_map': { + 'detector_id': 'detector_id', }, - "collection_format_map": {}, + 'location_map': { + 'detector_id': 'path', + 'rule_request': 'body', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] }, - api_client=api_client, + api_client=api_client ) self.delete_rule_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/actions/rules/{id}", - "operation_id": "delete_rule", - "http_method": "DELETE", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/actions/rules/{id}', + 'operation_id': 'delete_rule', + 'http_method': 'DELETE', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', ], - "required": [ - "id", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (int,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "id": "id", + 'openapi_types': { + 'id': + (int,), }, - "location_map": { - "id": "path", + 'attribute_map': { + 'id': 'id', }, - "collection_format_map": {}, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": [], + 'accept': [], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_rule_endpoint = _Endpoint( settings={ - "response_type": (Rule,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/actions/rules/{id}", - "operation_id": "get_rule", - "http_method": "GET", - "servers": None, + 'response_type': (Rule,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/actions/rules/{id}', + 'operation_id': 'get_rule', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', ], - "required": [ - "id", + 'required': [ + 'id', ], - "nullable": [], - "enum": [], - "validation": [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (int,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (int,), }, - "attribute_map": { - "id": "id", + 'attribute_map': { + 'id': 'id', }, - "location_map": { - "id": "path", + 'location_map': { + 'id': 'path', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.list_detector_rules_endpoint = _Endpoint( settings={ - "response_type": (PaginatedRuleList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/actions/detector/{detector_id}/rules", - "operation_id": "list_detector_rules", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedRuleList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/actions/detector/{detector_id}/rules', + 'operation_id': 'list_detector_rules', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "page", - "page_size", + 'all': [ + 'detector_id', + 'page', + 'page_size', + ], + 'required': [ + 'detector_id', + ], + 'nullable': [ ], - "required": [ - "detector_id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "page": (int,), - "page_size": (int,), + 'validations': { }, - "attribute_map": { - "detector_id": "detector_id", - "page": "page", - "page_size": "page_size", + 'allowed_values': { }, - "location_map": { - "detector_id": "path", - "page": "query", - "page_size": "query", + 'openapi_types': { + 'detector_id': + (str,), + 'page': + (int,), + 'page_size': + (int,), }, - "collection_format_map": {}, + 'attribute_map': { + 'detector_id': 'detector_id', + 'page': 'page', + 'page_size': 'page_size', + }, + 'location_map': { + 'detector_id': 'path', + 'page': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.list_rules_endpoint = _Endpoint( settings={ - "response_type": (PaginatedRuleList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/actions/rules", - "operation_id": "list_rules", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedRuleList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/actions/rules', + 'operation_id': 'list_rules', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "page", - "page_size", - "predictor_id", + 'all': [ + 'page', + 'page_size', + 'predictor_id', ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "page": (int,), - "page_size": (int,), - "predictor_id": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'page': + (int,), + 'page_size': + (int,), + 'predictor_id': + (str,), }, - "attribute_map": { - "page": "page", - "page_size": "page_size", - "predictor_id": "predictor_id", + 'attribute_map': { + 'page': 'page', + 'page_size': 'page_size', + 'predictor_id': 'predictor_id', }, - "location_map": { - "page": "query", - "page_size": "query", - "predictor_id": "query", + 'location_map': { + 'page': 'query', + 'page_size': 'query', + 'predictor_id': 'query', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def create_rule(self, detector_id, rule_request, **kwargs): + def create_rule( + self, + detector_id, + rule_request, + **kwargs + ): """create_rule # noqa: E501 Create a new rule for a detector # noqa: E501 @@ -303,20 +371,41 @@ def create_rule(self, detector_id, rule_request, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id - kwargs["rule_request"] = rule_request + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id + kwargs['rule_request'] = \ + rule_request return self.create_rule_endpoint.call_with_http_info(**kwargs) - def delete_rule(self, id, **kwargs): + def delete_rule( + self, + id, + **kwargs + ): """delete_rule # noqa: E501 Delete a rule # noqa: E501 @@ -362,19 +451,39 @@ def delete_rule(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.delete_rule_endpoint.call_with_http_info(**kwargs) - def get_rule(self, id, **kwargs): + def get_rule( + self, + id, + **kwargs + ): """get_rule # noqa: E501 Retrieve a rule # noqa: E501 @@ -420,19 +529,39 @@ def get_rule(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.get_rule_endpoint.call_with_http_info(**kwargs) - def list_detector_rules(self, detector_id, **kwargs): + def list_detector_rules( + self, + detector_id, + **kwargs + ): """list_detector_rules # noqa: E501 List all rules for a detector # noqa: E501 @@ -480,19 +609,38 @@ def list_detector_rules(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.list_detector_rules_endpoint.call_with_http_info(**kwargs) - def list_rules(self, **kwargs): + def list_rules( + self, + **kwargs + ): """list_rules # noqa: E501 Lists all rules over all detectors owned by the requester. # noqa: E501 @@ -539,13 +687,29 @@ def list_rules(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.list_rules_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/detector_groups_api.py b/generated/groundlight_openapi_client/api/detector_groups_api.py index 83a2cb4f..4088d2ba 100644 --- a/generated/groundlight_openapi_client/api/detector_groups_api.py +++ b/generated/groundlight_openapi_client/api/detector_groups_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.detector_group import DetectorGroup from groundlight_openapi_client.model.detector_group_request import DetectorGroupRequest @@ -38,68 +39,108 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_detector_group_endpoint = _Endpoint( settings={ - "response_type": (DetectorGroup,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detector-groups", - "operation_id": "create_detector_group", - "http_method": "POST", - "servers": None, + 'response_type': (DetectorGroup,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detector-groups', + 'operation_id': 'create_detector_group', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "detector_group_request", + 'all': [ + 'detector_group_request', + ], + 'required': [ + 'detector_group_request', ], - "required": [ - "detector_group_request", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_group_request": (DetectorGroupRequest,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": {}, - "location_map": { - "detector_group_request": "body", + 'openapi_types': { + 'detector_group_request': + (DetectorGroupRequest,), }, - "collection_format_map": {}, + 'attribute_map': { + }, + 'location_map': { + 'detector_group_request': 'body', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] }, - api_client=api_client, + api_client=api_client ) self.get_detector_groups_endpoint = _Endpoint( settings={ - "response_type": ([DetectorGroup],), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detector-groups", - "operation_id": "get_detector_groups", - "http_method": "GET", - "servers": None, + 'response_type': ([DetectorGroup],), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detector-groups', + 'operation_id': 'get_detector_groups', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, - params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": {}, - "attribute_map": {}, - "location_map": {}, - "collection_format_map": {}, + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def create_detector_group(self, detector_group_request, **kwargs): + def create_detector_group( + self, + detector_group_request, + **kwargs + ): """create_detector_group # noqa: E501 Create a new detector group POST data: Required: - name (str) - name of the predictor set # noqa: E501 @@ -145,19 +186,38 @@ def create_detector_group(self, detector_group_request, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_group_request"] = detector_group_request + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_group_request'] = \ + detector_group_request return self.create_detector_group_endpoint.call_with_http_info(**kwargs) - def get_detector_groups(self, **kwargs): + def get_detector_groups( + self, + **kwargs + ): """get_detector_groups # noqa: E501 List all detector groups # noqa: E501 @@ -201,13 +261,29 @@ def get_detector_groups(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.get_detector_groups_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/detector_reset_api.py b/generated/groundlight_openapi_client/api/detector_reset_api.py index c50532f8..1337ff20 100644 --- a/generated/groundlight_openapi_client/api/detector_reset_api.py +++ b/generated/groundlight_openapi_client/api/detector_reset_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) @@ -36,46 +37,59 @@ def __init__(self, api_client=None): self.api_client = api_client self.reset_detector_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/detector-reset/{id}", - "operation_id": "reset_detector", - "http_method": "DELETE", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detector-reset/{id}', + 'operation_id': 'reset_detector', + 'http_method': 'DELETE', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ ], - "required": [ - "id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { }, - "attribute_map": { - "id": "id", + 'allowed_values': { }, - "location_map": { - "id": "path", + 'openapi_types': { + 'id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": [], + 'accept': [], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def reset_detector(self, id, **kwargs): + def reset_detector( + self, + id, + **kwargs + ): """reset_detector # noqa: E501 Deletes all image queries on the detector # noqa: E501 @@ -121,14 +135,31 @@ def reset_detector(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.reset_detector_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/detectors_api.py b/generated/groundlight_openapi_client/api/detectors_api.py index eca18f45..a8a1be67 100644 --- a/generated/groundlight_openapi_client/api/detectors_api.py +++ b/generated/groundlight_openapi_client/api/detectors_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.detector import Detector from groundlight_openapi_client.model.detector_creation_input_request import DetectorCreationInputRequest @@ -42,286 +43,377 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_detector_endpoint = _Endpoint( settings={ - "response_type": (Detector,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors", - "operation_id": "create_detector", - "http_method": "POST", - "servers": None, + 'response_type': (Detector,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors', + 'operation_id': 'create_detector', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "detector_creation_input_request", + 'all': [ + 'detector_creation_input_request', + ], + 'required': [ + 'detector_creation_input_request', ], - "required": [ - "detector_creation_input_request", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_creation_input_request": (DetectorCreationInputRequest,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'detector_creation_input_request': + (DetectorCreationInputRequest,), }, - "attribute_map": {}, - "location_map": { - "detector_creation_input_request": "body", + 'attribute_map': { }, - "collection_format_map": {}, + 'location_map': { + 'detector_creation_input_request': 'body', + }, + 'collection_format_map': { + } + }, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json' + ] }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - api_client=api_client, + api_client=api_client ) self.delete_detector_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{id}", - "operation_id": "delete_detector", - "http_method": "DELETE", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{id}', + 'operation_id': 'delete_detector', + 'http_method': 'DELETE', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', ], - "required": [ - "id", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), }, - "attribute_map": { - "id": "id", + 'attribute_map': { + 'id': 'id', }, - "location_map": { - "id": "path", + 'location_map': { + 'id': 'path', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": [], + 'accept': [], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_detector_endpoint = _Endpoint( settings={ - "response_type": (Detector,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{id}", - "operation_id": "get_detector", - "http_method": "GET", - "servers": None, + 'response_type': (Detector,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{id}', + 'operation_id': 'get_detector', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ ], - "required": [ - "id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { }, - "attribute_map": { - "id": "id", + 'allowed_values': { }, - "location_map": { - "id": "path", + 'openapi_types': { + 'id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_detector_evaluation_endpoint = _Endpoint( settings={ - "response_type": (InlineResponse2001,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{id}/evaluation", - "operation_id": "get_detector_evaluation", - "http_method": "GET", - "servers": None, + 'response_type': (InlineResponse2001,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{id}/evaluation', + 'operation_id': 'get_detector_evaluation', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ ], - "required": [ - "id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { }, - "attribute_map": { - "id": "id", + 'allowed_values': { }, - "location_map": { - "id": "path", + 'openapi_types': { + 'id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_detector_metrics_endpoint = _Endpoint( settings={ - "response_type": (InlineResponse200,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{detector_id}/metrics", - "operation_id": "get_detector_metrics", - "http_method": "GET", - "servers": None, + 'response_type': (InlineResponse200,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{detector_id}/metrics', + 'operation_id': 'get_detector_metrics', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", + 'all': [ + 'detector_id', + ], + 'required': [ + 'detector_id', + ], + 'nullable': [ ], - "required": [ - "detector_id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), + 'validations': { }, - "attribute_map": { - "detector_id": "detector_id", + 'allowed_values': { }, - "location_map": { - "detector_id": "path", + 'openapi_types': { + 'detector_id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'detector_id': 'detector_id', + }, + 'location_map': { + 'detector_id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.list_detectors_endpoint = _Endpoint( settings={ - "response_type": (PaginatedDetectorList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors", - "operation_id": "list_detectors", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedDetectorList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors', + 'operation_id': 'list_detectors', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "page", - "page_size", - ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + 'all': [ + 'page', + 'page_size', + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "page": (int,), - "page_size": (int,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'page': + (int,), + 'page_size': + (int,), }, - "attribute_map": { - "page": "page", - "page_size": "page_size", + 'attribute_map': { + 'page': 'page', + 'page_size': 'page_size', }, - "location_map": { - "page": "query", - "page_size": "query", + 'location_map': { + 'page': 'query', + 'page_size': 'query', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.update_detector_endpoint = _Endpoint( settings={ - "response_type": (Detector,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{id}", - "operation_id": "update_detector", - "http_method": "PATCH", - "servers": None, + 'response_type': (Detector,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{id}', + 'operation_id': 'update_detector', + 'http_method': 'PATCH', + 'servers': None, }, params_map={ - "all": [ - "id", - "patched_detector_request", + 'all': [ + 'id', + 'patched_detector_request', + ], + 'required': [ + 'id', ], - "required": [ - "id", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), - "patched_detector_request": (PatchedDetectorRequest,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'id': + (str,), + 'patched_detector_request': + (PatchedDetectorRequest,), }, - "attribute_map": { - "id": "id", + 'attribute_map': { + 'id': 'id', }, - "location_map": { - "id": "path", - "patched_detector_request": "body", + 'location_map': { + 'id': 'path', + 'patched_detector_request': 'body', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] }, - api_client=api_client, + api_client=api_client ) - def create_detector(self, detector_creation_input_request, **kwargs): + def create_detector( + self, + detector_creation_input_request, + **kwargs + ): """create_detector # noqa: E501 Create a new detector. # noqa: E501 @@ -367,19 +459,39 @@ def create_detector(self, detector_creation_input_request, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_creation_input_request"] = detector_creation_input_request + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_creation_input_request'] = \ + detector_creation_input_request return self.create_detector_endpoint.call_with_http_info(**kwargs) - def delete_detector(self, id, **kwargs): + def delete_detector( + self, + id, + **kwargs + ): """delete_detector # noqa: E501 Delete a detector by its ID. # noqa: E501 @@ -425,19 +537,39 @@ def delete_detector(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.delete_detector_endpoint.call_with_http_info(**kwargs) - def get_detector(self, id, **kwargs): + def get_detector( + self, + id, + **kwargs + ): """get_detector # noqa: E501 Retrieve a detector by its ID. # noqa: E501 @@ -483,19 +615,39 @@ def get_detector(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.get_detector_endpoint.call_with_http_info(**kwargs) - def get_detector_evaluation(self, id, **kwargs): + def get_detector_evaluation( + self, + id, + **kwargs + ): """get_detector_evaluation # noqa: E501 Get Detector evaluation results. The result is null if there isn't enough ground truth data to evaluate the detector. Returns the time of the evaulation, total ground truth labels, the ml based kfold accuracies, and the system accuracies at different confidence thresholds # noqa: E501 @@ -541,19 +693,39 @@ def get_detector_evaluation(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.get_detector_evaluation_endpoint.call_with_http_info(**kwargs) - def get_detector_metrics(self, detector_id, **kwargs): + def get_detector_metrics( + self, + detector_id, + **kwargs + ): """get_detector_metrics # noqa: E501 Get Detector metrics, primarily the counts of different types of labels # noqa: E501 @@ -599,19 +771,38 @@ def get_detector_metrics(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.get_detector_metrics_endpoint.call_with_http_info(**kwargs) - def list_detectors(self, **kwargs): + def list_detectors( + self, + **kwargs + ): """list_detectors # noqa: E501 Retrieve a list of detectors. # noqa: E501 @@ -657,18 +848,37 @@ def list_detectors(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.list_detectors_endpoint.call_with_http_info(**kwargs) - def update_detector(self, id, **kwargs): + def update_detector( + self, + id, + **kwargs + ): """update_detector # noqa: E501 Update a detector # noqa: E501 @@ -715,14 +925,31 @@ def update_detector(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.update_detector_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/edge_api.py b/generated/groundlight_openapi_client/api/edge_api.py index a0b3187d..09229eb0 100644 --- a/generated/groundlight_openapi_client/api/edge_api.py +++ b/generated/groundlight_openapi_client/api/edge_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo @@ -37,70 +38,102 @@ def __init__(self, api_client=None): self.api_client = api_client self.edge_report_metrics_create_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/edge/report-metrics", - "operation_id": "edge_report_metrics_create", - "http_method": "POST", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/edge/report-metrics', + 'operation_id': 'edge_report_metrics_create', + 'http_method': 'POST', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, - params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": {}, - "attribute_map": {}, - "location_map": {}, - "collection_format_map": {}, + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": [], + 'accept': [], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_model_urls_endpoint = _Endpoint( settings={ - "response_type": (EdgeModelInfo,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/edge/fetch-model-urls/{detector_id}/", - "operation_id": "get_model_urls", - "http_method": "GET", - "servers": None, + 'response_type': (EdgeModelInfo,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/edge/fetch-model-urls/{detector_id}/', + 'operation_id': 'get_model_urls', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", + 'all': [ + 'detector_id', ], - "required": [ - "detector_id", + 'required': [ + 'detector_id', ], - "nullable": [], - "enum": [], - "validation": [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'detector_id': + (str,), }, - "attribute_map": { - "detector_id": "detector_id", + 'attribute_map': { + 'detector_id': 'detector_id', }, - "location_map": { - "detector_id": "path", + 'location_map': { + 'detector_id': 'path', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def edge_report_metrics_create(self, **kwargs): + def edge_report_metrics_create( + self, + **kwargs + ): """edge_report_metrics_create # noqa: E501 Edge server periodically calls this to report metrics. POST body will have JSON data that we log. # noqa: E501 @@ -144,18 +177,37 @@ def edge_report_metrics_create(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.edge_report_metrics_create_endpoint.call_with_http_info(**kwargs) - def get_model_urls(self, detector_id, **kwargs): + def get_model_urls( + self, + detector_id, + **kwargs + ): """get_model_urls # noqa: E501 Gets time limited pre-authenticated URLs to download a detector's edge model and oodd model. # noqa: E501 @@ -201,14 +253,31 @@ def get_model_urls(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.get_model_urls_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/image_queries_api.py b/generated/groundlight_openapi_client/api/image_queries_api.py index 03ad2600..8c601a07 100644 --- a/generated/groundlight_openapi_client/api/image_queries_api.py +++ b/generated/groundlight_openapi_client/api/image_queries_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.image_query import ImageQuery from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList @@ -38,218 +39,275 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_image_endpoint = _Endpoint( settings={ - "response_type": (file_type,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/image-queries/{id}/image", - "operation_id": "get_image", - "http_method": "GET", - "servers": None, + 'response_type': (file_type,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/image-queries/{id}/image', + 'operation_id': 'get_image', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ ], - "required": [ - "id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { }, - "attribute_map": { - "id": "id", + 'allowed_values': { }, - "location_map": { - "id": "path", + 'openapi_types': { + 'id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["image/jpeg"], - "content_type": [], + 'accept': [ + 'image/jpeg' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_image_query_endpoint = _Endpoint( settings={ - "response_type": (ImageQuery,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/image-queries/{id}", - "operation_id": "get_image_query", - "http_method": "GET", - "servers": None, + 'response_type': (ImageQuery,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/image-queries/{id}', + 'operation_id': 'get_image_query', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "id", + 'all': [ + 'id', + ], + 'required': [ + 'id', + ], + 'nullable': [ ], - "required": [ - "id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { }, - "attribute_map": { - "id": "id", + 'allowed_values': { }, - "location_map": { - "id": "path", + 'openapi_types': { + 'id': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'id': 'id', + }, + 'location_map': { + 'id': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.list_image_queries_endpoint = _Endpoint( settings={ - "response_type": (PaginatedImageQueryList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/image-queries", - "operation_id": "list_image_queries", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedImageQueryList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/image-queries', + 'operation_id': 'list_image_queries', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "page", - "page_size", + 'all': [ + 'detector_id', + 'page', + 'page_size', + ], + 'required': [], + 'nullable': [ ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "page": (int,), - "page_size": (int,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "detector_id": "detector_id", - "page": "page", - "page_size": "page_size", + 'openapi_types': { + 'detector_id': + (str,), + 'page': + (int,), + 'page_size': + (int,), }, - "location_map": { - "detector_id": "query", - "page": "query", - "page_size": "query", + 'attribute_map': { + 'detector_id': 'detector_id', + 'page': 'page', + 'page_size': 'page_size', }, - "collection_format_map": {}, + 'location_map': { + 'detector_id': 'query', + 'page': 'query', + 'page_size': 'query', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.submit_image_query_endpoint = _Endpoint( settings={ - "response_type": (ImageQuery,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/image-queries", - "operation_id": "submit_image_query", - "http_method": "POST", - "servers": None, + 'response_type': (ImageQuery,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/image-queries', + 'operation_id': 'submit_image_query', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "confidence_threshold", - "human_review", - "image_query_id", - "inspection_id", - "metadata", - "patience_time", - "want_async", - "body", + 'all': [ + 'detector_id', + 'confidence_threshold', + 'human_review', + 'image_query_id', + 'inspection_id', + 'metadata', + 'patience_time', + 'want_async', + 'body', ], - "required": [ - "detector_id", + 'required': [ + 'detector_id', ], - "nullable": [], - "enum": [], - "validation": [ - "confidence_threshold", + 'nullable': [ ], + 'enum': [ + ], + 'validation': [ + 'confidence_threshold', + ] }, root_map={ - "validations": { - ("confidence_threshold",): { - "inclusive_maximum": 1, - "inclusive_minimum": 0, + 'validations': { + ('confidence_threshold',): { + + 'inclusive_maximum': 1, + 'inclusive_minimum': 0, }, }, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "confidence_threshold": (float,), - "human_review": (str,), - "image_query_id": (str,), - "inspection_id": (str,), - "metadata": (str,), - "patience_time": (float,), - "want_async": (str,), - "body": (file_type,), + 'allowed_values': { + }, + 'openapi_types': { + 'detector_id': + (str,), + 'confidence_threshold': + (float,), + 'human_review': + (str,), + 'image_query_id': + (str,), + 'inspection_id': + (str,), + 'metadata': + (str,), + 'patience_time': + (float,), + 'want_async': + (str,), + 'body': + (file_type,), }, - "attribute_map": { - "detector_id": "detector_id", - "confidence_threshold": "confidence_threshold", - "human_review": "human_review", - "image_query_id": "image_query_id", - "inspection_id": "inspection_id", - "metadata": "metadata", - "patience_time": "patience_time", - "want_async": "want_async", + 'attribute_map': { + 'detector_id': 'detector_id', + 'confidence_threshold': 'confidence_threshold', + 'human_review': 'human_review', + 'image_query_id': 'image_query_id', + 'inspection_id': 'inspection_id', + 'metadata': 'metadata', + 'patience_time': 'patience_time', + 'want_async': 'want_async', }, - "location_map": { - "detector_id": "query", - "confidence_threshold": "query", - "human_review": "query", - "image_query_id": "query", - "inspection_id": "query", - "metadata": "query", - "patience_time": "query", - "want_async": "query", - "body": "body", + 'location_map': { + 'detector_id': 'query', + 'confidence_threshold': 'query', + 'human_review': 'query', + 'image_query_id': 'query', + 'inspection_id': 'query', + 'metadata': 'query', + 'patience_time': 'query', + 'want_async': 'query', + 'body': 'body', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [ - "image/jpeg", - "image/jpg", - "image/png", - "image/gif", - "image/webp", - "image/bmp", - "image/x-icon", + 'accept': [ + 'application/json' ], + 'content_type': [ + 'image/jpeg', + 'image/jpg', + 'image/png', + 'image/gif', + 'image/webp', + 'image/bmp', + 'image/x-icon' + ] }, - api_client=api_client, + api_client=api_client ) - def get_image(self, id, **kwargs): + def get_image( + self, + id, + **kwargs + ): """get_image # noqa: E501 Retrieve an image by its ID. # noqa: E501 @@ -295,19 +353,39 @@ def get_image(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.get_image_endpoint.call_with_http_info(**kwargs) - def get_image_query(self, id, **kwargs): + def get_image_query( + self, + id, + **kwargs + ): """get_image_query # noqa: E501 Retrieve an image-query by its ID. # noqa: E501 @@ -353,19 +431,38 @@ def get_image_query(self, id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["id"] = id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['id'] = \ + id return self.get_image_query_endpoint.call_with_http_info(**kwargs) - def list_image_queries(self, **kwargs): + def list_image_queries( + self, + **kwargs + ): """list_image_queries # noqa: E501 Retrieve a list of image-queries. # noqa: E501 @@ -412,18 +509,37 @@ def list_image_queries(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.list_image_queries_endpoint.call_with_http_info(**kwargs) - def submit_image_query(self, detector_id, **kwargs): + def submit_image_query( + self, + detector_id, + **kwargs + ): """submit_image_query # noqa: E501 Submit an image query against a detector. You must use `\"Content-Type: image/jpeg\"` or similar (image/png, image/webp, etc) for the image data. For example: ```Bash $ curl https://api.groundlight.ai/device-api/v1/image-queries?detector_id=det_abc123 \\ --header \"Content-Type: image/jpeg\" \\ --data-binary @path/to/filename.jpeg ``` # noqa: E501 @@ -477,14 +593,31 @@ def submit_image_query(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.submit_image_query_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/labels_api.py b/generated/groundlight_openapi_client/api/labels_api.py index fd948a9f..3a9f141d 100644 --- a/generated/groundlight_openapi_client/api/labels_api.py +++ b/generated/groundlight_openapi_client/api/labels_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.label_value import LabelValue from groundlight_openapi_client.model.label_value_request import LabelValueRequest @@ -38,44 +39,64 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_label_endpoint = _Endpoint( settings={ - "response_type": (LabelValue,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/labels", - "operation_id": "create_label", - "http_method": "POST", - "servers": None, + 'response_type': (LabelValue,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/labels', + 'operation_id': 'create_label', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "label_value_request", + 'all': [ + 'label_value_request', + ], + 'required': [ + 'label_value_request', + ], + 'nullable': [ ], - "required": [ - "label_value_request", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "label_value_request": (LabelValueRequest,), + 'validations': { }, - "attribute_map": {}, - "location_map": { - "label_value_request": "body", + 'allowed_values': { }, - "collection_format_map": {}, + 'openapi_types': { + 'label_value_request': + (LabelValueRequest,), + }, + 'attribute_map': { + }, + 'location_map': { + 'label_value_request': 'body', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] }, - api_client=api_client, + api_client=api_client ) - def create_label(self, label_value_request, **kwargs): + def create_label( + self, + label_value_request, + **kwargs + ): """create_label # noqa: E501 Create a new LabelValue and attach it to an image query. This will trigger asynchronous fine-tuner model training. # noqa: E501 @@ -121,14 +142,31 @@ def create_label(self, label_value_request, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["label_value_request"] = label_value_request + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['label_value_request'] = \ + label_value_request return self.create_label_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py b/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py index ed467035..1df2695e 100644 --- a/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py +++ b/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.account_month_to_date_info import AccountMonthToDateInfo @@ -37,30 +38,53 @@ def __init__(self, api_client=None): self.api_client = api_client self.month_to_date_account_info_endpoint = _Endpoint( settings={ - "response_type": (AccountMonthToDateInfo,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/month-to-date-account-info", - "operation_id": "month_to_date_account_info", - "http_method": "GET", - "servers": None, + 'response_type': (AccountMonthToDateInfo,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/month-to-date-account-info', + 'operation_id': 'month_to_date_account_info', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, - params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": {}, - "attribute_map": {}, - "location_map": {}, - "collection_format_map": {}, + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def month_to_date_account_info(self, **kwargs): + def month_to_date_account_info( + self, + **kwargs + ): """month_to_date_account_info # noqa: E501 Fetches and returns the account-specific metrics based on the current user's group. # noqa: E501 @@ -104,13 +128,29 @@ def month_to_date_account_info(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.month_to_date_account_info_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/notes_api.py b/generated/groundlight_openapi_client/api/notes_api.py index f1af2cb5..d5a842d1 100644 --- a/generated/groundlight_openapi_client/api/notes_api.py +++ b/generated/groundlight_openapi_client/api/notes_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.all_notes import AllNotes from groundlight_openapi_client.model.note_request import NoteRequest @@ -38,89 +39,118 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_note_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/notes", - "operation_id": "create_note", - "http_method": "POST", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/notes', + 'operation_id': 'create_note', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "note_request", + 'all': [ + 'detector_id', + 'note_request', + ], + 'required': [ + 'detector_id', + ], + 'nullable': [ ], - "required": [ - "detector_id", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "note_request": (NoteRequest,), + 'validations': { }, - "attribute_map": { - "detector_id": "detector_id", + 'allowed_values': { }, - "location_map": { - "detector_id": "query", - "note_request": "body", + 'openapi_types': { + 'detector_id': + (str,), + 'note_request': + (NoteRequest,), }, - "collection_format_map": {}, + 'attribute_map': { + 'detector_id': 'detector_id', + }, + 'location_map': { + 'detector_id': 'query', + 'note_request': 'body', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + 'accept': [], + 'content_type': [ + 'application/json', + 'application/x-www-form-urlencoded', + 'multipart/form-data' + ] }, - api_client=api_client, + api_client=api_client ) self.get_notes_endpoint = _Endpoint( settings={ - "response_type": (AllNotes,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/notes", - "operation_id": "get_notes", - "http_method": "GET", - "servers": None, + 'response_type': (AllNotes,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/notes', + 'operation_id': 'get_notes', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", + 'all': [ + 'detector_id', ], - "required": [ - "detector_id", + 'required': [ + 'detector_id', ], - "nullable": [], - "enum": [], - "validation": [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'detector_id': + (str,), }, - "attribute_map": { - "detector_id": "detector_id", + 'attribute_map': { + 'detector_id': 'detector_id', }, - "location_map": { - "detector_id": "query", + 'location_map': { + 'detector_id': 'query', }, - "collection_format_map": {}, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def create_note(self, detector_id, **kwargs): + def create_note( + self, + detector_id, + **kwargs + ): """create_note # noqa: E501 Creates a new note. # noqa: E501 @@ -167,19 +197,39 @@ def create_note(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.create_note_endpoint.call_with_http_info(**kwargs) - def get_notes(self, detector_id, **kwargs): + def get_notes( + self, + detector_id, + **kwargs + ): """get_notes # noqa: E501 Retrieves all notes from a given detector and returns them in lists, one for each note_category. # noqa: E501 @@ -225,14 +275,31 @@ def get_notes(self, detector_id, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") - kwargs["detector_id"] = detector_id + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') + kwargs['detector_id'] = \ + detector_id return self.get_notes_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api/user_api.py b/generated/groundlight_openapi_client/api/user_api.py index a14200f2..d3b268d0 100644 --- a/generated/groundlight_openapi_client/api/user_api.py +++ b/generated/groundlight_openapi_client/api/user_api.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -19,7 +20,7 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 @@ -37,30 +38,53 @@ def __init__(self, api_client=None): self.api_client = api_client self.who_am_i_endpoint = _Endpoint( settings={ - "response_type": (InlineResponse2002,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/me", - "operation_id": "who_am_i", - "http_method": "GET", - "servers": None, + 'response_type': (InlineResponse2002,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/me', + 'operation_id': 'who_am_i', + 'http_method': 'GET', + 'servers': None, + }, + params_map={ + 'all': [ + ], + 'required': [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, - params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": {}, - "attribute_map": {}, - "location_map": {}, - "collection_format_map": {}, + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + }, + 'attribute_map': { + }, + 'location_map': { + }, + 'collection_format_map': { + } }, headers_map={ - "accept": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) - def who_am_i(self, **kwargs): + def who_am_i( + self, + **kwargs + ): """who_am_i # noqa: E501 Retrieve the current user. # noqa: E501 @@ -104,13 +128,29 @@ def who_am_i(self, **kwargs): If the method is called asynchronously, returns the request thread. """ - kwargs["async_req"] = kwargs.get("async_req", False) - kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) - kwargs["_preload_content"] = kwargs.get("_preload_content", True) - kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) - kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) - kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) - kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) - kwargs["_content_type"] = kwargs.get("_content_type") - kwargs["_host_index"] = kwargs.get("_host_index") + kwargs['async_req'] = kwargs.get( + 'async_req', False + ) + kwargs['_return_http_data_only'] = kwargs.get( + '_return_http_data_only', True + ) + kwargs['_preload_content'] = kwargs.get( + '_preload_content', True + ) + kwargs['_request_timeout'] = kwargs.get( + '_request_timeout', None + ) + kwargs['_check_input_type'] = kwargs.get( + '_check_input_type', True + ) + kwargs['_check_return_type'] = kwargs.get( + '_check_return_type', True + ) + kwargs['_spec_property_naming'] = kwargs.get( + '_spec_property_naming', False + ) + kwargs['_content_type'] = kwargs.get( + '_content_type') + kwargs['_host_index'] = kwargs.get('_host_index') return self.who_am_i_endpoint.call_with_http_info(**kwargs) + diff --git a/generated/groundlight_openapi_client/api_client.py b/generated/groundlight_openapi_client/api_client.py index da2e348a..e18e15fa 100644 --- a/generated/groundlight_openapi_client/api_client.py +++ b/generated/groundlight_openapi_client/api_client.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import json import atexit import mimetypes @@ -35,7 +36,7 @@ file_type, model_to_dict, none_type, - validate_and_convert_types, + validate_and_convert_types ) @@ -63,7 +64,8 @@ class ApiClient(object): _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1): + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None, pool_threads=1): if configuration is None: configuration = Configuration.get_default_copy() self.configuration = configuration @@ -75,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "OpenAPI-Generator/1.0.0/python" + self.user_agent = 'OpenAPI-Generator/1.0.0/python' def __enter__(self): return self @@ -88,13 +90,13 @@ def close(self): self._pool.close() self._pool.join() self._pool = None - if hasattr(atexit, "unregister"): + if hasattr(atexit, 'unregister'): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. + avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) @@ -104,11 +106,11 @@ def pool(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers["User-Agent"] + return self.default_headers['User-Agent'] @user_agent.setter def user_agent(self, value): - self.default_headers["User-Agent"] = value + self.default_headers['User-Agent'] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -131,7 +133,7 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None, + _content_type: typing.Optional[str] = None ): config = self.configuration @@ -140,39 +142,48 @@ def __call_api( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params["Cookie"] = self.cookie + header_params['Cookie'] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) # 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), safe=config.safe_chars_for_path_param)) + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, collection_formats) + query_params = self.parameters_to_tuples(query_params, + collection_formats) # 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)) - if header_params["Content-Type"].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, (dict)) + if header_params['Content-Type'].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, + (dict) ) # body if body: body = self.sanitize_for_serialization(body) # auth setting - self.update_params_for_auth(header_params, query_params, auth_settings, resource_path, method, body) + self.update_params_for_auth(header_params, query_params, + auth_settings, resource_path, method, body) # request url if _host is None: @@ -184,17 +195,12 @@ def __call_api( try: # perform request and return response response_data = self.request( - method, - url, - query_params=query_params, - headers=header_params, - post_params=post_params, - body=body, + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, _preload_content=_preload_content, - _request_timeout=_request_timeout, - ) + _request_timeout=_request_timeout) except ApiException as e: - e.body = e.body.decode("utf-8") + e.body = e.body.decode('utf-8') raise e self.last_response = response_data @@ -202,28 +208,33 @@ def __call_api( return_data = response_data if not _preload_content: - return return_data + return (return_data) return return_data # deserialize response data if response_type: if response_type != (file_type,): encoding = "utf-8" - 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) if match: encoding = match.group(1) response_data.data = response_data.data.decode(encoding) - return_data = self.deserialize(response_data, response_type, _check_type) + return_data = self.deserialize( + response_data, + response_type, + _check_type + ) else: return_data = None if _return_http_data_only: - return return_data + return (return_data) else: - return (return_data, response_data.status, response_data.getheaders()) + return (return_data, response_data.status, + response_data.getheaders()) def parameters_to_multipart(self, params, collection_types): """Get parameters as list of tuples, formatting as json if value is collection_types @@ -234,15 +245,15 @@ def parameters_to_multipart(self, params, collection_types): """ new_params = [] if collection_types is None: - collection_types = dict + collection_types = (dict) for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) + if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) else: - new_params.append((k, v)) + new_params.append((k, v)) return new_params @classmethod @@ -260,7 +271,9 @@ def sanitize_for_serialization(cls, obj): :return: The serialized form of data. """ if isinstance(obj, (ModelNormal, ModelComposed)): - return {key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()} + return { + key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() + } elif isinstance(obj, io.IOBase): return cls.get_file_data_and_close_file(obj) elif isinstance(obj, (str, int, float, none_type, bool)): @@ -273,7 +286,7 @@ def sanitize_for_serialization(cls, obj): return [cls.sanitize_for_serialization(item) for item in obj] if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError("Unable to prepare type {} for serialization".format(obj.__class__.__name__)) + raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. @@ -299,7 +312,8 @@ def deserialize(self, response, response_type, _check_type): # save response body into a tmp file and return the instance if response_type == (file_type,): content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, content_disposition=content_disposition) + return deserialize_file(response.data, self.configuration, + content_disposition=content_disposition) # fetch data from response object try: @@ -310,7 +324,12 @@ def deserialize(self, response, response_type, _check_type): # store our data under the key of 'received_data' so users have some # context if they are deserializing a string and the data type is wrong deserialized_data = validate_and_convert_types( - received_data, response_type, ["received_data"], True, _check_type, configuration=self.configuration + received_data, + response_type, + ['received_data'], + True, + _check_type, + configuration=self.configuration ) return deserialized_data @@ -332,7 +351,7 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None, + _check_type: typing.Optional[bool] = None ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -388,126 +407,87 @@ def call_api( then the method will return the response directly. """ if not async_req: - return self.__call_api( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _check_type, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - path_params, - query_params, - header_params, - body, - post_params, - files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, - _check_type, - ), - ) - - def request( - self, - method, - url, - query_params=None, - headers=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout, _host, + _check_type) + + return self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, + query_params, + header_params, body, + post_params, files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, _check_type)) + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) elif method == "HEAD": - return self.rest_client.HEAD( - url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers, - ) + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) elif method == "OPTIONS": - return self.rest_client.OPTIONS( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "POST": - return self.rest_client.POST( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "PUT": - return self.rest_client.PUT( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "PATCH": - return self.rest_client.PATCH( - url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) elif method == "DELETE": - return self.rest_client.DELETE( - url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) else: - raise ApiValueError("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") + raise ApiValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -522,18 +502,19 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 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 @@ -565,12 +546,15 @@ def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[i continue if file_instance.closed is True: raise ApiValueError( - "Cannot read a closed file. The passed in file_type for %s must be open." % param_name + "Cannot read a closed file. The passed in file_type " + "for %s must be open." % param_name ) filename = os.path.basename(file_instance.name) filedata = self.get_file_data_and_close_file(file_instance) - mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" - params.append(tuple([param_name, tuple([filename, filedata, mimetype])])) + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([param_name, tuple([filename, filedata, mimetype])])) return params @@ -585,10 +569,10 @@ def select_header_accept(self, accepts): accepts = [x.lower() for x in accepts] - if "application/json" in accepts: - return "application/json" + if 'application/json' in accepts: + return 'application/json' else: - return ", ".join(accepts) + return ', '.join(accepts) def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. @@ -599,19 +583,22 @@ def select_header_content_type(self, content_types, method=None, body=None): :return: Content-Type (e.g. application/json). """ if not content_types: - return "application/json" + return 'application/json' content_types = [x.lower() for x in content_types] - if method == "PATCH" and "application/json-patch+json" in content_types and isinstance(body, list): - return "application/json-patch+json" + if (method == 'PATCH' and + 'application/json-patch+json' in content_types and + isinstance(body, list)): + return 'application/json-patch+json' - if "application/json" in content_types or "*/*" in content_types: - return "application/json" + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' else: return content_types[0] - def update_params_for_auth(self, headers, queries, auth_settings, resource_path, method, body): + def update_params_for_auth(self, headers, queries, auth_settings, + resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -628,19 +615,22 @@ def update_params_for_auth(self, headers, queries, auth_settings, resource_path, for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting["in"] == "cookie": - headers["Cookie"] = auth_setting["value"] - elif auth_setting["in"] == "header": - if auth_setting["type"] != "http-signature": - headers[auth_setting["key"]] = auth_setting["value"] - elif auth_setting["in"] == "query": - queries.append((auth_setting["key"], auth_setting["value"])) + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) else: - raise ApiValueError("Authentication token must be in `query` or `header`") + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, headers_map=None, api_client=None, callable=None): + def __init__(self, settings=None, params_map=None, root_map=None, + headers_map=None, api_client=None, callable=None): """Creates an endpoint Args: @@ -676,52 +666,59 @@ def __init__(self, settings=None, params_map=None, root_map=None, headers_map=No """ self.settings = settings self.params_map = params_map - self.params_map["all"].extend([ - "async_req", - "_host_index", - "_preload_content", - "_request_timeout", - "_return_http_data_only", - "_check_input_type", - "_check_return_type", - "_content_type", - "_spec_property_naming", + self.params_map['all'].extend([ + 'async_req', + '_host_index', + '_preload_content', + '_request_timeout', + '_return_http_data_only', + '_check_input_type', + '_check_return_type', + '_content_type', + '_spec_property_naming' ]) - self.params_map["nullable"].extend(["_request_timeout"]) - self.validations = root_map["validations"] - self.allowed_values = root_map["allowed_values"] - self.openapi_types = root_map["openapi_types"] + self.params_map['nullable'].extend(['_request_timeout']) + self.validations = root_map['validations'] + self.allowed_values = root_map['allowed_values'] + self.openapi_types = root_map['openapi_types'] extra_types = { - "async_req": (bool,), - "_host_index": (none_type, int), - "_preload_content": (bool,), - "_request_timeout": (none_type, float, (float,), [float], int, (int,), [int]), - "_return_http_data_only": (bool,), - "_check_input_type": (bool,), - "_check_return_type": (bool,), - "_spec_property_naming": (bool,), - "_content_type": (none_type, str), + 'async_req': (bool,), + '_host_index': (none_type, int), + '_preload_content': (bool,), + '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), + '_return_http_data_only': (bool,), + '_check_input_type': (bool,), + '_check_return_type': (bool,), + '_spec_property_naming': (bool,), + '_content_type': (none_type, str) } self.openapi_types.update(extra_types) - self.attribute_map = root_map["attribute_map"] - self.location_map = root_map["location_map"] - self.collection_format_map = root_map["collection_format_map"] + self.attribute_map = root_map['attribute_map'] + self.location_map = root_map['location_map'] + self.collection_format_map = root_map['collection_format_map'] self.headers_map = headers_map self.api_client = api_client self.callable = callable def __validate_inputs(self, kwargs): - for param in self.params_map["enum"]: + for param in self.params_map['enum']: if param in kwargs: - check_allowed_values(self.allowed_values, (param,), kwargs[param]) + check_allowed_values( + self.allowed_values, + (param,), + kwargs[param] + ) - for param in self.params_map["validation"]: + for param in self.params_map['validation']: if param in kwargs: check_validations( - self.validations, (param,), kwargs[param], configuration=self.api_client.configuration + self.validations, + (param,), + kwargs[param], + configuration=self.api_client.configuration ) - if kwargs["_check_input_type"] is False: + if kwargs['_check_input_type'] is False: return for key, value in kwargs.items(): @@ -729,42 +726,52 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - kwargs["_spec_property_naming"], - kwargs["_check_input_type"], - configuration=self.api_client.configuration, + kwargs['_spec_property_naming'], + kwargs['_check_input_type'], + configuration=self.api_client.configuration ) kwargs[key] = fixed_val def __gather_params(self, kwargs): - params = {"body": None, "collection_format": {}, "file": {}, "form": [], "header": {}, "path": {}, "query": []} + params = { + 'body': None, + 'collection_format': {}, + 'file': {}, + 'form': [], + 'header': {}, + 'path': {}, + 'query': [] + } for param_name, param_value in kwargs.items(): param_location = self.location_map.get(param_name) if param_location is None: continue if param_location: - if param_location == "body": - params["body"] = param_value + if param_location == 'body': + params['body'] = param_value continue base_name = self.attribute_map[param_name] - if param_location == "form" and self.openapi_types[param_name] == (file_type,): - params["file"][base_name] = [param_value] - elif param_location == "form" and self.openapi_types[param_name] == ([file_type],): + if (param_location == 'form' and + self.openapi_types[param_name] == (file_type,)): + params['file'][base_name] = [param_value] + elif (param_location == 'form' and + self.openapi_types[param_name] == ([file_type],)): # param_value is already a list - params["file"][base_name] = param_value - elif param_location in {"form", "query"}: + params['file'][base_name] = param_value + elif param_location in {'form', 'query'}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) - if param_location not in {"form", "query"}: + if param_location not in {'form', 'query'}: params[param_location][base_name] = param_value collection_format = self.collection_format_map.get(param_name) if collection_format: - params["collection_format"][base_name] = collection_format + params['collection_format'][base_name] = collection_format return params def __call__(self, *args, **kwargs): - """This method is invoked when endpoints are called + """ This method is invoked when endpoints are called Example: api_instance = ActionsApi() @@ -779,79 +786,82 @@ def __call__(self, *args, **kwargs): def call_with_http_info(self, **kwargs): try: - index = ( - self.api_client.configuration.server_operation_index.get( - self.settings["operation_id"], self.api_client.configuration.server_index - ) - if kwargs["_host_index"] is None - else kwargs["_host_index"] - ) + index = self.api_client.configuration.server_operation_index.get( + self.settings['operation_id'], self.api_client.configuration.server_index + ) if kwargs['_host_index'] is None else kwargs['_host_index'] server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings["operation_id"], self.api_client.configuration.server_variables + self.settings['operation_id'], self.api_client.configuration.server_variables ) _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings["servers"] + index, variables=server_variables, servers=self.settings['servers'] ) except IndexError: - if self.settings["servers"]: - raise ApiValueError("Invalid host index. Must be 0 <= index < %s" % len(self.settings["servers"])) + if self.settings['servers']: + raise ApiValueError( + "Invalid host index. Must be 0 <= index < %s" % + len(self.settings['servers']) + ) _host = None for key, value in kwargs.items(): - if key not in self.params_map["all"]: + if key not in self.params_map['all']: raise ApiTypeError( - "Got an unexpected parameter '%s' to method `%s`" % (key, self.settings["operation_id"]) + "Got an unexpected parameter '%s'" + " to method `%s`" % + (key, self.settings['operation_id']) ) # only throw this nullable ApiValueError if _check_input_type # is False, if _check_input_type==True we catch this case # in self.__validate_inputs - if key not in self.params_map["nullable"] and value is None and kwargs["_check_input_type"] is False: + if (key not in self.params_map['nullable'] and value is None + and kwargs['_check_input_type'] is False): raise ApiValueError( - "Value may not be None for non-nullable parameter `%s` when calling `%s`" - % (key, self.settings["operation_id"]) + "Value may not be None for non-nullable parameter `%s`" + " when calling `%s`" % + (key, self.settings['operation_id']) ) - for key in self.params_map["required"]: + for key in self.params_map['required']: if key not in kwargs.keys(): raise ApiValueError( - "Missing the required parameter `%s` when calling `%s`" % (key, self.settings["operation_id"]) + "Missing the required parameter `%s` when calling " + "`%s`" % (key, self.settings['operation_id']) ) self.__validate_inputs(kwargs) params = self.__gather_params(kwargs) - accept_headers_list = self.headers_map["accept"] + accept_headers_list = self.headers_map['accept'] if accept_headers_list: - params["header"]["Accept"] = self.api_client.select_header_accept(accept_headers_list) + params['header']['Accept'] = self.api_client.select_header_accept( + accept_headers_list) - if kwargs.get("_content_type"): - params["header"]["Content-Type"] = kwargs["_content_type"] + if kwargs.get('_content_type'): + params['header']['Content-Type'] = kwargs['_content_type'] else: - content_type_headers_list = self.headers_map["content_type"] + content_type_headers_list = self.headers_map['content_type'] if content_type_headers_list: - if params["body"] != "": + if params['body'] != "": header_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings["http_method"], params["body"] - ) - params["header"]["Content-Type"] = header_list + content_type_headers_list, self.settings['http_method'], + params['body']) + params['header']['Content-Type'] = header_list return self.api_client.call_api( - self.settings["endpoint_path"], - self.settings["http_method"], - params["path"], - params["query"], - params["header"], - body=params["body"], - post_params=params["form"], - files=params["file"], - response_type=self.settings["response_type"], - auth_settings=self.settings["auth"], - async_req=kwargs["async_req"], - _check_type=kwargs["_check_return_type"], - _return_http_data_only=kwargs["_return_http_data_only"], - _preload_content=kwargs["_preload_content"], - _request_timeout=kwargs["_request_timeout"], + self.settings['endpoint_path'], self.settings['http_method'], + params['path'], + params['query'], + params['header'], + body=params['body'], + post_params=params['form'], + files=params['file'], + response_type=self.settings['response_type'], + auth_settings=self.settings['auth'], + async_req=kwargs['async_req'], + _check_type=kwargs['_check_return_type'], + _return_http_data_only=kwargs['_return_http_data_only'], + _preload_content=kwargs['_preload_content'], + _request_timeout=kwargs['_request_timeout'], _host=_host, - collection_formats=params["collection_format"], - ) + collection_formats=params['collection_format']) diff --git a/generated/groundlight_openapi_client/apis/__init__.py b/generated/groundlight_openapi_client/apis/__init__.py index 1da138d1..dc144e2b 100644 --- a/generated/groundlight_openapi_client/apis/__init__.py +++ b/generated/groundlight_openapi_client/apis/__init__.py @@ -1,3 +1,4 @@ + # flake8: noqa # Import all APIs into this package. diff --git a/generated/groundlight_openapi_client/configuration.py b/generated/groundlight_openapi_client/configuration.py index 654b832f..ac1146ca 100644 --- a/generated/groundlight_openapi_client/configuration.py +++ b/generated/groundlight_openapi_client/configuration.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import copy import logging import multiprocessing @@ -19,112 +20,99 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { - "multipleOf", - "maximum", - "exclusiveMaximum", - "minimum", - "exclusiveMinimum", - "maxLength", - "minLength", - "pattern", - "maxItems", - "minItems", + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' } - class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - - conf = groundlight_openapi_client.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} - ) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + +conf = groundlight_openapi_client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} +) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ _default = None - def __init__( - self, - host=None, - api_key=None, - api_key_prefix=None, - access_token=None, - username=None, - password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor""" + def __init__(self, host=None, + api_key=None, api_key_prefix=None, + access_token=None, + username=None, password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, server_variables=None, + server_operation_index=None, server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor + """ self._base_path = "https://api.groundlight.ai/device-api" if host is None else host """Default Base url """ @@ -167,7 +155,7 @@ def __init__( """ self.logger["package_logger"] = logging.getLogger("groundlight_openapi_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = "%(asctime)s %(levelname)s %(message)s" + self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None @@ -218,7 +206,7 @@ def __init__( self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = "" + self.safe_chars_for_path_param = '' """Safe chars for path_param """ self.retries = None @@ -235,7 +223,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ("logger", "logger_file_handler"): + if k not in ('logger', 'logger_file_handler'): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -246,11 +234,12 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == "disabled_client_side_validations": - s = set(filter(None, value.split(","))) + if name == 'disabled_client_side_validations': + s = set(filter(None, value.split(','))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError("Invalid keyword: '{0}''".format(v)) + raise ApiValueError( + "Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s @classmethod @@ -391,7 +380,9 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') def auth_settings(self): """Gets Auth Settings dict for api client. @@ -399,13 +390,13 @@ def auth_settings(self): :return: The Auth Settings information dict. """ auth = {} - if "ApiToken" in self.api_key: - auth["ApiToken"] = { - "type": "api_key", - "in": "header", - "key": "x-api-token", - "value": self.get_api_key_with_prefix( - "ApiToken", + if 'ApiToken' in self.api_key: + auth['ApiToken'] = { + 'type': 'api_key', + 'in': 'header', + 'key': 'x-api-token', + 'value': self.get_api_key_with_prefix( + 'ApiToken', ), } return auth @@ -415,13 +406,12 @@ def to_debug_report(self): :return: The report for debugging. """ - return ( - "Python SDK Debug Report:\n" - "OS: {env}\n" - "Python Version: {pyversion}\n" - "Version of the API: 0.18.2\n" - "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) - ) + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: 0.18.2\n"\ + "SDK Package Version: 1.0.0".\ + format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): """Gets an array of host settings @@ -430,21 +420,21 @@ def get_host_settings(self): """ return [ { - "url": "https://api.groundlight.ai/device-api", - "description": "Prod", + 'url': "https://api.groundlight.ai/device-api", + 'description': "Prod", }, { - "url": "https://api.integ.groundlight.ai/device-api", - "description": "Integ", + 'url': "https://api.integ.groundlight.ai/device-api", + 'description': "Integ", }, { - "url": "https://device.positronix.ai/device-api", - "description": "Device Prod", + 'url': "https://device.positronix.ai/device-api", + 'description': "Device Prod", }, { - "url": "https://device.integ.positronix.ai/device-api", - "description": "Device Integ", - }, + 'url': "https://device.integ.positronix.ai/device-api", + 'description': "Device Integ", + } ] def get_host_from_settings(self, index, variables=None, servers=None): @@ -464,21 +454,23 @@ def get_host_from_settings(self, index, variables=None, servers=None): server = servers[index] except IndexError: raise ValueError( - "Invalid index {0} when selecting the host settings. Must be less than {1}".format(index, len(servers)) - ) + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) - url = server["url"] + url = server['url'] # go through variables and replace placeholders - for variable_name, variable in server.get("variables", {}).items(): - used_value = variables.get(variable_name, variable["default_value"]) + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) - if "enum_values" in variable and used_value not in variable["enum_values"]: + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: raise ValueError( - "The variable `{0}` in the host URL has invalid value {1}. Must be {2}.".format( - variable_name, variables[variable_name], variable["enum_values"] - ) - ) + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) url = url.replace("{" + variable_name + "}", used_value) diff --git a/generated/groundlight_openapi_client/exceptions.py b/generated/groundlight_openapi_client/exceptions.py index 393dbba8..5cb07d28 100644 --- a/generated/groundlight_openapi_client/exceptions.py +++ b/generated/groundlight_openapi_client/exceptions.py @@ -9,13 +9,15 @@ """ + class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): - """Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors Args: msg (str): the exception message @@ -96,6 +98,7 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): + def __init__(self, status=None, reason=None, http_resp=None): if http_resp: self.status = http_resp.status @@ -110,9 +113,11 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\nReason: {1}\n".format(self.status, self.reason) + 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) + error_message += "HTTP response headers: {0}\n".format( + self.headers) if self.body: error_message += "HTTP response body: {0}\n".format(self.body) @@ -121,21 +126,25 @@ def __str__(self): class NotFoundException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(NotFoundException, self).__init__(status, reason, http_resp) class UnauthorizedException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(UnauthorizedException, self).__init__(status, reason, http_resp) class ForbiddenException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(ForbiddenException, self).__init__(status, reason, http_resp) class ServiceException(ApiException): + def __init__(self, status=None, reason=None, http_resp=None): super(ServiceException, self).__init__(status, reason, http_resp) diff --git a/generated/groundlight_openapi_client/model/account_month_to_date_info.py b/generated/groundlight_openapi_client/model/account_month_to_date_info.py index 98dd18e3..ff8a5a91 100644 --- a/generated/groundlight_openapi_client/model/account_month_to_date_info.py +++ b/generated/groundlight_openapi_client/model/account_month_to_date_info.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class AccountMonthToDateInfo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class AccountMonthToDateInfo(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,45 +82,36 @@ def openapi_types(): and the value is attribute type. """ return { - "iqs": (int,), # noqa: E501 - "escalations": (int,), # noqa: E501 - "active_detectors": (int,), # noqa: E501 - "iqs_limit": ( - int, - none_type, - ), # noqa: E501 - "escalations_limit": ( - int, - none_type, - ), # noqa: E501 - "active_detectors_limit": ( - int, - none_type, - ), # noqa: E501 + 'iqs': (int,), # noqa: E501 + 'escalations': (int,), # noqa: E501 + 'active_detectors': (int,), # noqa: E501 + 'iqs_limit': (int, none_type,), # noqa: E501 + 'escalations_limit': (int, none_type,), # noqa: E501 + 'active_detectors_limit': (int, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "iqs": "iqs", # noqa: E501 - "escalations": "escalations", # noqa: E501 - "active_detectors": "active_detectors", # noqa: E501 - "iqs_limit": "iqs_limit", # noqa: E501 - "escalations_limit": "escalations_limit", # noqa: E501 - "active_detectors_limit": "active_detectors_limit", # noqa: E501 + 'iqs': 'iqs', # noqa: E501 + 'escalations': 'escalations', # noqa: E501 + 'active_detectors': 'active_detectors', # noqa: E501 + 'iqs_limit': 'iqs_limit', # noqa: E501 + 'escalations_limit': 'escalations_limit', # noqa: E501 + 'active_detectors_limit': 'active_detectors_limit', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs - ): # noqa: E501 + def _from_openapi_data(cls, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs): # noqa: E501 """AccountMonthToDateInfo - a model defined in OpenAPI Args: @@ -170,18 +155,17 @@ def _from_openapi_data( _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -203,30 +187,26 @@ def _from_openapi_data( self.escalations_limit = escalations_limit self.active_detectors_limit = active_detectors_limit for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args - def __init__( - self, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs - ): # noqa: E501 + def __init__(self, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs): # noqa: E501 """AccountMonthToDateInfo - a model defined in OpenAPI Args: @@ -270,16 +250,15 @@ def __init__( _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -301,17 +280,13 @@ def __init__( self.escalations_limit = escalations_limit self.active_detectors_limit = active_detectors_limit for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/action.py b/generated/groundlight_openapi_client/model/action.py index 8308d44b..516ab4d9 100644 --- a/generated/groundlight_openapi_client/model/action.py +++ b/generated/groundlight_openapi_client/model/action.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.channel_enum import ChannelEnum - - globals()["ChannelEnum"] = ChannelEnum + globals()['ChannelEnum'] = ChannelEnum class Action(ModelNormal): @@ -59,9 +59,11 @@ class Action(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,22 +88,24 @@ def openapi_types(): """ lazy_import() return { - "channel": (ChannelEnum,), # noqa: E501 - "recipient": (str,), # noqa: E501 - "include_image": (bool,), # noqa: E501 + 'channel': (ChannelEnum,), # noqa: E501 + 'recipient': (str,), # noqa: E501 + 'include_image': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "channel": "channel", # noqa: E501 - "recipient": "recipient", # noqa: E501 - "include_image": "include_image", # noqa: E501 + 'channel': 'channel', # noqa: E501 + 'recipient': 'recipient', # noqa: E501 + 'include_image': 'include_image', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -158,18 +152,17 @@ def _from_openapi_data(cls, channel, recipient, include_image, *args, **kwargs): _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -188,24 +181,22 @@ def _from_openapi_data(cls, channel, recipient, include_image, *args, **kwargs): self.recipient = recipient self.include_image = include_image for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -250,16 +241,15 @@ def __init__(self, channel, recipient, include_image, *args, **kwargs): # noqa: _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -278,17 +268,13 @@ def __init__(self, channel, recipient, include_image, *args, **kwargs): # noqa: self.recipient = recipient self.include_image = include_image for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/action_list.py b/generated/groundlight_openapi_client/model/action_list.py index a38fae04..604f75ae 100644 --- a/generated/groundlight_openapi_client/model/action_list.py +++ b/generated/groundlight_openapi_client/model/action_list.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.action import Action - - globals()["Action"] = Action + globals()['Action'] = Action class ActionList(ModelSimple): @@ -55,9 +55,11 @@ class ActionList(ModelSimple): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } additional_properties_type = None @@ -75,13 +77,14 @@ def openapi_types(): """ lazy_import() return { - "value": ([Action],), + 'value': ([Action],), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -89,12 +92,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -140,10 +143,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -154,15 +157,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -179,8 +181,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -232,12 +233,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -248,15 +249,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -273,8 +273,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/all_notes.py b/generated/groundlight_openapi_client/model/all_notes.py index 89da5af1..2e3cb921 100644 --- a/generated/groundlight_openapi_client/model/all_notes.py +++ b/generated/groundlight_openapi_client/model/all_notes.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.note import Note - - globals()["Note"] = Note + globals()['Note'] = Note class AllNotes(ModelNormal): @@ -59,9 +59,11 @@ class AllNotes(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,20 +88,22 @@ def openapi_types(): """ lazy_import() return { - "customer": ([Note],), # noqa: E501 - "gl": ([Note],), # noqa: E501 + 'customer': ([Note],), # noqa: E501 + 'gl': ([Note],), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "customer": "CUSTOMER", # noqa: E501 - "gl": "GL", # noqa: E501 + 'customer': 'CUSTOMER', # noqa: E501 + 'gl': 'GL', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -155,18 +149,17 @@ def _from_openapi_data(cls, customer, gl, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -184,24 +177,22 @@ def _from_openapi_data(cls, customer, gl, *args, **kwargs): # noqa: E501 self.customer = customer self.gl = gl for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -245,16 +236,15 @@ def __init__(self, customer, gl, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -272,17 +262,13 @@ def __init__(self, customer, gl, *args, **kwargs): # noqa: E501 self.customer = customer self.gl = gl for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/annotations_requested_enum.py b/generated/groundlight_openapi_client/model/annotations_requested_enum.py index 1e1f6b8f..5b9a80a4 100644 --- a/generated/groundlight_openapi_client/model/annotations_requested_enum.py +++ b/generated/groundlight_openapi_client/model/annotations_requested_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class AnnotationsRequestedEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,13 +52,14 @@ class AnnotationsRequestedEnum(ModelSimple): """ allowed_values = { - ("value",): { - "BINARY_CLASSIFICATION": "BINARY_CLASSIFICATION", - "BOUNDING_BOXES": "BOUNDING_BOXES", + ('value',): { + 'BINARY_CLASSIFICATION': "BINARY_CLASSIFICATION", + 'BOUNDING_BOXES': "BOUNDING_BOXES", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -73,13 +76,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -87,12 +91,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -138,10 +142,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -152,15 +156,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,8 +180,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -230,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -246,15 +248,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -271,8 +272,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/b_box_geometry.py b/generated/groundlight_openapi_client/model/b_box_geometry.py index 2282dfd7..1ad77b5d 100644 --- a/generated/groundlight_openapi_client/model/b_box_geometry.py +++ b/generated/groundlight_openapi_client/model/b_box_geometry.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BBoxGeometry(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class BBoxGeometry(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,30 +82,31 @@ def openapi_types(): and the value is attribute type. """ return { - "left": (float,), # noqa: E501 - "top": (float,), # noqa: E501 - "right": (float,), # noqa: E501 - "bottom": (float,), # noqa: E501 - "x": (float,), # noqa: E501 - "y": (float,), # noqa: E501 + 'left': (float,), # noqa: E501 + 'top': (float,), # noqa: E501 + 'right': (float,), # noqa: E501 + 'bottom': (float,), # noqa: E501 + 'x': (float,), # noqa: E501 + 'y': (float,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "left": "left", # noqa: E501 - "top": "top", # noqa: E501 - "right": "right", # noqa: E501 - "bottom": "bottom", # noqa: E501 - "x": "x", # noqa: E501 - "y": "y", # noqa: E501 + 'left': 'left', # noqa: E501 + 'top': 'top', # noqa: E501 + 'right': 'right', # noqa: E501 + 'bottom': 'bottom', # noqa: E501 + 'x': 'x', # noqa: E501 + 'y': 'y', # noqa: E501 } read_only_vars = { - "x", # noqa: E501 - "y", # noqa: E501 + 'x', # noqa: E501 + 'y', # noqa: E501 } _composed_schemas = {} @@ -162,18 +157,17 @@ def _from_openapi_data(cls, left, top, right, bottom, x, y, *args, **kwargs): # _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -195,24 +189,22 @@ def _from_openapi_data(cls, left, top, right, bottom, x, y, *args, **kwargs): # self.x = x self.y = y for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -257,16 +249,15 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +277,13 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/b_box_geometry_request.py b/generated/groundlight_openapi_client/model/b_box_geometry_request.py index fcac579f..9d591392 100644 --- a/generated/groundlight_openapi_client/model/b_box_geometry_request.py +++ b/generated/groundlight_openapi_client/model/b_box_geometry_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BBoxGeometryRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class BBoxGeometryRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,24 +82,26 @@ def openapi_types(): and the value is attribute type. """ return { - "left": (float,), # noqa: E501 - "top": (float,), # noqa: E501 - "right": (float,), # noqa: E501 - "bottom": (float,), # noqa: E501 + 'left': (float,), # noqa: E501 + 'top': (float,), # noqa: E501 + 'right': (float,), # noqa: E501 + 'bottom': (float,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "left": "left", # noqa: E501 - "top": "top", # noqa: E501 - "right": "right", # noqa: E501 - "bottom": "bottom", # noqa: E501 + 'left': 'left', # noqa: E501 + 'top': 'top', # noqa: E501 + 'right': 'right', # noqa: E501 + 'bottom': 'bottom', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -153,18 +149,17 @@ def _from_openapi_data(cls, left, top, right, bottom, *args, **kwargs): # noqa: _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -184,24 +179,22 @@ def _from_openapi_data(cls, left, top, right, bottom, *args, **kwargs): # noqa: self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -247,16 +240,15 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -276,17 +268,13 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/binary_classification_result.py b/generated/groundlight_openapi_client/model/binary_classification_result.py index 018a6f3e..31ed8ba4 100644 --- a/generated/groundlight_openapi_client/model/binary_classification_result.py +++ b/generated/groundlight_openapi_client/model/binary_classification_result.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BinaryClassificationResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,15 +56,15 @@ class BinaryClassificationResult(ModelNormal): """ allowed_values = { - ("result_type",): { - "BINARY_CLASSIFICATION": "binary_classification", + ('result_type',): { + 'BINARY_CLASSIFICATION': "binary_classification", }, } validations = { - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -72,17 +74,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -97,29 +89,28 @@ def openapi_types(): and the value is attribute type. """ return { - "label": (str,), # noqa: E501 - "confidence": ( - float, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "result_type": (str,), # noqa: E501 - "from_edge": (bool,), # noqa: E501 + 'label': (str,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'result_type': (str,), # noqa: E501 + 'from_edge': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "source": "source", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "from_edge": "from_edge", # noqa: E501 + 'label': 'label', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'source': 'source', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'from_edge': 'from_edge', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -168,18 +159,17 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +186,22 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -260,16 +248,15 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +273,13 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/blank_enum.py b/generated/groundlight_openapi_client/model/blank_enum.py index aa466bb8..86d08e37 100644 --- a/generated/groundlight_openapi_client/model/blank_enum.py +++ b/generated/groundlight_openapi_client/model/blank_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BlankEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,12 +52,13 @@ class BlankEnum(ModelSimple): """ allowed_values = { - ("value",): { - "EMPTY": "", + ('value',): { + 'EMPTY': "", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -72,13 +75,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -86,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -137,25 +141,24 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -172,8 +175,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -225,27 +227,26 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -262,8 +263,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/bounding_box_label_enum.py b/generated/groundlight_openapi_client/model/bounding_box_label_enum.py new file mode 100644 index 00000000..8a243593 --- /dev/null +++ b/generated/groundlight_openapi_client/model/bounding_box_label_enum.py @@ -0,0 +1,285 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + + +class BoundingBoxLabelEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'NO_OBJECTS': "NO_OBJECTS", + 'BOUNDING_BOX': "BOUNDING_BOX", + 'GREATER_THAN_MAX': "GREATER_THAN_MAX", + 'UNCLEAR': "UNCLEAR", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), + } + + @cached_property + def discriminator(): + return None + + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """BoundingBoxLabelEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["NO_OBJECTS", "BOUNDING_BOX", "GREATER_THAN_MAX", "UNCLEAR", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["NO_OBJECTS", "BOUNDING_BOX", "GREATER_THAN_MAX", "UNCLEAR", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """BoundingBoxLabelEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str):, must be one of ["NO_OBJECTS", "BOUNDING_BOX", "GREATER_THAN_MAX", "UNCLEAR", ] # noqa: E501 + + Keyword Args: + value (str):, must be one of ["NO_OBJECTS", "BOUNDING_BOX", "GREATER_THAN_MAX", "UNCLEAR", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop('_path_to_item', ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if 'value' in kwargs: + value = kwargs.pop('value') + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py index bcf98f27..1e0df799 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BoundingBoxModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,12 +55,13 @@ class BoundingBoxModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("max_num_bboxes",): { - "inclusive_maximum": 50, - "inclusive_minimum": 1, + ('max_num_bboxes',): { + 'inclusive_maximum': 50, + 'inclusive_minimum': 1, }, } @@ -68,17 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -93,20 +86,22 @@ def openapi_types(): and the value is attribute type. """ return { - "class_name": (str,), # noqa: E501 - "max_num_bboxes": (int,), # noqa: E501 + 'class_name': (str,), # noqa: E501 + 'max_num_bboxes': (int,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "class_name": "class_name", # noqa: E501 - "max_num_bboxes": "max_num_bboxes", # noqa: E501 + 'class_name': 'class_name', # noqa: E501 + 'max_num_bboxes': 'max_num_bboxes', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -152,18 +147,17 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 max_num_bboxes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -180,24 +174,22 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -241,16 +233,15 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 max_num_bboxes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -267,17 +258,13 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/bounding_box_result.py b/generated/groundlight_openapi_client/model/bounding_box_result.py index 8fc4c417..4cd54892 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_result.py +++ b/generated/groundlight_openapi_client/model/bounding_box_result.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class BoundingBoxResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,15 +56,15 @@ class BoundingBoxResult(ModelNormal): """ allowed_values = { - ("result_type",): { - "BOUNDING_BOX": "bounding_box", + ('result_type',): { + 'BOUNDING_BOX': "bounding_box", }, } validations = { - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -72,17 +74,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -97,29 +89,28 @@ def openapi_types(): and the value is attribute type. """ return { - "label": (str,), # noqa: E501 - "confidence": ( - float, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "result_type": (str,), # noqa: E501 - "from_edge": (bool,), # noqa: E501 + 'label': (str,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'result_type': (str,), # noqa: E501 + 'from_edge': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "source": "source", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "from_edge": "from_edge", # noqa: E501 + 'label': 'label', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'source': 'source', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'from_edge': 'from_edge', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -168,18 +159,17 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +186,22 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -260,16 +248,15 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +273,13 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/channel_enum.py b/generated/groundlight_openapi_client/model/channel_enum.py index 720dac0d..9e6c4886 100644 --- a/generated/groundlight_openapi_client/model/channel_enum.py +++ b/generated/groundlight_openapi_client/model/channel_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class ChannelEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,13 +52,14 @@ class ChannelEnum(ModelSimple): """ allowed_values = { - ("value",): { - "TEXT": "TEXT", - "EMAIL": "EMAIL", + ('value',): { + 'TEXT': "TEXT", + 'EMAIL': "EMAIL", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -73,13 +76,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -87,12 +91,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -138,10 +142,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -152,15 +156,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,8 +180,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -230,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -246,15 +248,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -271,8 +272,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/condition.py b/generated/groundlight_openapi_client/model/condition.py index 65a2861f..48e6131f 100644 --- a/generated/groundlight_openapi_client/model/condition.py +++ b/generated/groundlight_openapi_client/model/condition.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class Condition(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class Condition(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,20 +82,22 @@ def openapi_types(): and the value is attribute type. """ return { - "verb": (str,), # noqa: E501 - "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'verb': (str,), # noqa: E501 + 'parameters': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "verb": "verb", # noqa: E501 - "parameters": "parameters", # noqa: E501 + 'verb': 'verb', # noqa: E501 + 'parameters': 'parameters', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -147,18 +143,17 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -176,24 +171,22 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -237,16 +230,15 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -264,17 +256,13 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/condition_request.py b/generated/groundlight_openapi_client/model/condition_request.py index 674578a6..c5326c64 100644 --- a/generated/groundlight_openapi_client/model/condition_request.py +++ b/generated/groundlight_openapi_client/model/condition_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class ConditionRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class ConditionRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,20 +82,22 @@ def openapi_types(): and the value is attribute type. """ return { - "verb": (str,), # noqa: E501 - "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'verb': (str,), # noqa: E501 + 'parameters': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "verb": "verb", # noqa: E501 - "parameters": "parameters", # noqa: E501 + 'verb': 'verb', # noqa: E501 + 'parameters': 'parameters', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -147,18 +143,17 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -176,24 +171,22 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -237,16 +230,15 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -264,17 +256,13 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/count_mode_configuration.py b/generated/groundlight_openapi_client/model/count_mode_configuration.py index 9c2d3be9..7603f76d 100644 --- a/generated/groundlight_openapi_client/model/count_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/count_mode_configuration.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class CountModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,12 +55,13 @@ class CountModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("max_count",): { - "inclusive_maximum": 50, - "inclusive_minimum": 1, + ('max_count',): { + 'inclusive_maximum': 50, + 'inclusive_minimum': 1, }, } @@ -68,17 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -93,20 +86,22 @@ def openapi_types(): and the value is attribute type. """ return { - "class_name": (str,), # noqa: E501 - "max_count": (int,), # noqa: E501 + 'class_name': (str,), # noqa: E501 + 'max_count': (int,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "class_name": "class_name", # noqa: E501 - "max_count": "max_count", # noqa: E501 + 'class_name': 'class_name', # noqa: E501 + 'max_count': 'max_count', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -152,18 +147,17 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 max_count (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -180,24 +174,22 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -241,16 +233,15 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 max_count (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -267,17 +258,13 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/counting_result.py b/generated/groundlight_openapi_client/model/counting_result.py index 85e692e5..ebc34cdf 100644 --- a/generated/groundlight_openapi_client/model/counting_result.py +++ b/generated/groundlight_openapi_client/model/counting_result.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class CountingResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,18 +56,18 @@ class CountingResult(ModelNormal): """ allowed_values = { - ("result_type",): { - "COUNTING": "counting", + ('result_type',): { + 'COUNTING': "counting", }, } validations = { - ("count",): { - "inclusive_minimum": 0, + ('count',): { + 'inclusive_minimum': 0, }, - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -75,17 +77,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -100,34 +92,30 @@ def openapi_types(): and the value is attribute type. """ return { - "count": ( - int, - none_type, - ), # noqa: E501 - "confidence": ( - float, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "result_type": (str,), # noqa: E501 - "from_edge": (bool,), # noqa: E501 - "greater_than_max": (bool,), # noqa: E501 + 'count': (int, none_type,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'result_type': (str,), # noqa: E501 + 'from_edge': (bool,), # noqa: E501 + 'greater_than_max': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "count": "count", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "source": "source", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "from_edge": "from_edge", # noqa: E501 - "greater_than_max": "greater_than_max", # noqa: E501 + 'count': 'count', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'source': 'source', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'from_edge': 'from_edge', # noqa: E501 + 'greater_than_max': 'greater_than_max', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -177,18 +165,17 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -205,24 +192,22 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 self.count = count for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -270,16 +255,15 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -296,17 +280,13 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 self.count = count for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py index 2cde7991..cb1f2bca 100644 --- a/generated/groundlight_openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -33,10 +34,9 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum from groundlight_openapi_client.model.status_enum import StatusEnum - - globals()["BlankEnum"] = BlankEnum - globals()["DetectorTypeEnum"] = DetectorTypeEnum - globals()["StatusEnum"] = StatusEnum + globals()['BlankEnum'] = BlankEnum + globals()['DetectorTypeEnum'] = DetectorTypeEnum + globals()['StatusEnum'] = StatusEnum class Detector(ModelNormal): @@ -63,19 +63,20 @@ class Detector(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 200, + ('name',): { + 'max_length': 200, }, - ("confidence_threshold",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence_threshold',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, - ("patience_time",): { - "inclusive_maximum": 3600, - "inclusive_minimum": 0, + ('patience_time',): { + 'inclusive_maximum': 3600, + 'inclusive_minimum': 0, }, } @@ -86,17 +87,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -112,85 +103,58 @@ def openapi_types(): """ lazy_import() return { - "id": (str,), # noqa: E501 - "type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "name": (str,), # noqa: E501 - "query": (str,), # noqa: E501 - "group_name": (str,), # noqa: E501 - "metadata": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "mode": (str,), # noqa: E501 - "mode_configuration": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "confidence_threshold": (float,), # noqa: E501 - "patience_time": (float,), # noqa: E501 - "status": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "escalation_type": (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'query': (str,), # noqa: E501 + 'group_name': (str,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'mode': (str,), # noqa: E501 + 'mode_configuration': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'confidence_threshold': (float,), # noqa: E501 + 'patience_time': (float,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'escalation_type': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "type": "type", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "name": "name", # noqa: E501 - "query": "query", # noqa: E501 - "group_name": "group_name", # noqa: E501 - "metadata": "metadata", # noqa: E501 - "mode": "mode", # noqa: E501 - "mode_configuration": "mode_configuration", # noqa: E501 - "confidence_threshold": "confidence_threshold", # noqa: E501 - "patience_time": "patience_time", # noqa: E501 - "status": "status", # noqa: E501 - "escalation_type": "escalation_type", # noqa: E501 + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'name': 'name', # noqa: E501 + 'query': 'query', # noqa: E501 + 'group_name': 'group_name', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'mode': 'mode', # noqa: E501 + 'mode_configuration': 'mode_configuration', # noqa: E501 + 'confidence_threshold': 'confidence_threshold', # noqa: E501 + 'patience_time': 'patience_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'escalation_type': 'escalation_type', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 - "type", # noqa: E501 - "created_at", # noqa: E501 - "query", # noqa: E501 - "group_name", # noqa: E501 - "metadata", # noqa: E501 - "mode", # noqa: E501 - "mode_configuration", # noqa: E501 + 'id', # noqa: E501 + 'type', # noqa: E501 + 'created_at', # noqa: E501 + 'query', # noqa: E501 + 'group_name', # noqa: E501 + 'metadata', # noqa: E501 + 'mode', # noqa: E501 + 'mode_configuration', # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, id, type, created_at, name, query, group_name, metadata, mode, mode_configuration, *args, **kwargs - ): # noqa: E501 + def _from_openapi_data(cls, id, type, created_at, name, query, group_name, metadata, mode, mode_configuration, *args, **kwargs): # noqa: E501 """Detector - a model defined in OpenAPI Args: @@ -241,18 +205,17 @@ def _from_openapi_data( escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -277,24 +240,22 @@ def _from_openapi_data( self.mode = mode self.mode_configuration = mode_configuration for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -339,16 +300,15 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -365,17 +325,13 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/detector_creation_input_request.py b/generated/groundlight_openapi_client/model/detector_creation_input_request.py index ca1b1563..76e0f8a2 100644 --- a/generated/groundlight_openapi_client/model/detector_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/detector_creation_input_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -35,12 +36,11 @@ def lazy_import(): from groundlight_openapi_client.model.mode_enum import ModeEnum from groundlight_openapi_client.model.multi_class_mode_configuration import MultiClassModeConfiguration from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration - - globals()["BoundingBoxModeConfiguration"] = BoundingBoxModeConfiguration - globals()["CountModeConfiguration"] = CountModeConfiguration - globals()["ModeEnum"] = ModeEnum - globals()["MultiClassModeConfiguration"] = MultiClassModeConfiguration - globals()["TextModeConfiguration"] = TextModeConfiguration + globals()['BoundingBoxModeConfiguration'] = BoundingBoxModeConfiguration + globals()['CountModeConfiguration'] = CountModeConfiguration + globals()['ModeEnum'] = ModeEnum + globals()['MultiClassModeConfiguration'] = MultiClassModeConfiguration + globals()['TextModeConfiguration'] = TextModeConfiguration class DetectorCreationInputRequest(ModelNormal): @@ -67,35 +67,36 @@ class DetectorCreationInputRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 200, - "min_length": 1, + ('name',): { + 'max_length': 200, + 'min_length': 1, }, - ("query",): { - "max_length": 300, - "min_length": 1, + ('query',): { + 'max_length': 300, + 'min_length': 1, }, - ("group_name",): { - "max_length": 100, - "min_length": 1, + ('group_name',): { + 'max_length': 100, + 'min_length': 1, }, - ("confidence_threshold",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence_threshold',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, - ("patience_time",): { - "inclusive_maximum": 3600, - "inclusive_minimum": 0, + ('patience_time',): { + 'inclusive_maximum': 3600, + 'inclusive_minimum': 0, }, - ("pipeline_config",): { - "max_length": 100, + ('pipeline_config',): { + 'max_length': 100, }, - ("metadata",): { - "max_length": 1362, - "min_length": 1, + ('metadata',): { + 'max_length': 1362, + 'min_length': 1, }, } @@ -106,17 +107,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -132,57 +123,36 @@ def openapi_types(): """ lazy_import() return { - "name": (str,), # noqa: E501 - "query": (str,), # noqa: E501 - "group_name": (str,), # noqa: E501 - "confidence_threshold": (float,), # noqa: E501 - "patience_time": (float,), # noqa: E501 - "pipeline_config": ( - str, - none_type, - ), # noqa: E501 - "metadata": (str,), # noqa: E501 - "mode": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "mode_configuration": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + 'name': (str,), # noqa: E501 + 'query': (str,), # noqa: E501 + 'group_name': (str,), # noqa: E501 + 'confidence_threshold': (float,), # noqa: E501 + 'patience_time': (float,), # noqa: E501 + 'pipeline_config': (str, none_type,), # noqa: E501 + 'metadata': (str,), # noqa: E501 + 'mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'mode_configuration': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "query": "query", # noqa: E501 - "group_name": "group_name", # noqa: E501 - "confidence_threshold": "confidence_threshold", # noqa: E501 - "patience_time": "patience_time", # noqa: E501 - "pipeline_config": "pipeline_config", # noqa: E501 - "metadata": "metadata", # noqa: E501 - "mode": "mode", # noqa: E501 - "mode_configuration": "mode_configuration", # noqa: E501 + 'name': 'name', # noqa: E501 + 'query': 'query', # noqa: E501 + 'group_name': 'group_name', # noqa: E501 + 'confidence_threshold': 'confidence_threshold', # noqa: E501 + 'patience_time': 'patience_time', # noqa: E501 + 'pipeline_config': 'pipeline_config', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'mode': 'mode', # noqa: E501 + 'mode_configuration': 'mode_configuration', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -235,18 +205,17 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -264,24 +233,22 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 self.name = name self.query = query for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -332,16 +299,15 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -359,17 +325,13 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 self.name = name self.query = query for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/detector_group.py b/generated/groundlight_openapi_client/model/detector_group.py index 5620b0c9..7eaa28f7 100644 --- a/generated/groundlight_openapi_client/model/detector_group.py +++ b/generated/groundlight_openapi_client/model/detector_group.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class DetectorGroup(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,11 +55,12 @@ class DetectorGroup(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 100, + ('name',): { + 'max_length': 100, }, } @@ -67,17 +70,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,21 +85,22 @@ def openapi_types(): and the value is attribute type. """ return { - "id": (str,), # noqa: E501 - "name": (str,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "name": "name", # noqa: E501 + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 + 'id', # noqa: E501 } _composed_schemas = {} @@ -153,18 +147,17 @@ def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -182,24 +175,22 @@ def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 self.id = id self.name = name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -241,16 +232,15 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -267,17 +257,13 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/detector_group_request.py b/generated/groundlight_openapi_client/model/detector_group_request.py index 3302860f..f28697d3 100644 --- a/generated/groundlight_openapi_client/model/detector_group_request.py +++ b/generated/groundlight_openapi_client/model/detector_group_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class DetectorGroupRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,12 +55,13 @@ class DetectorGroupRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 100, - "min_length": 1, + ('name',): { + 'max_length': 100, + 'min_length': 1, }, } @@ -68,17 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -93,18 +86,20 @@ def openapi_types(): and the value is attribute type. """ return { - "name": (str,), # noqa: E501 + 'name': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 + 'name': 'name', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -149,18 +144,17 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,24 +171,22 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -237,16 +229,15 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -263,17 +254,13 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/detector_type_enum.py b/generated/groundlight_openapi_client/model/detector_type_enum.py index 94d446da..49b7825e 100644 --- a/generated/groundlight_openapi_client/model/detector_type_enum.py +++ b/generated/groundlight_openapi_client/model/detector_type_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class DetectorTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,12 +52,13 @@ class DetectorTypeEnum(ModelSimple): """ allowed_values = { - ("value",): { - "DETECTOR": "detector", + ('value',): { + 'DETECTOR': "detector", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -72,13 +75,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -86,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -137,25 +141,24 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "detector" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -172,8 +175,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -225,27 +227,26 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "detector" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -262,8 +263,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/edge_model_info.py b/generated/groundlight_openapi_client/model/edge_model_info.py index 66826368..be63c482 100644 --- a/generated/groundlight_openapi_client/model/edge_model_info.py +++ b/generated/groundlight_openapi_client/model/edge_model_info.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class EdgeModelInfo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class EdgeModelInfo(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,60 +82,32 @@ def openapi_types(): and the value is attribute type. """ return { - "model_binary_id": (str,), # noqa: E501 - "model_binary_url": (str,), # noqa: E501 - "oodd_model_binary_id": (str,), # noqa: E501 - "oodd_model_binary_url": (str,), # noqa: E501 - "pipeline_config": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "oodd_pipeline_config": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "predictor_metadata": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 + 'model_binary_id': (str,), # noqa: E501 + 'model_binary_url': (str,), # noqa: E501 + 'oodd_model_binary_id': (str,), # noqa: E501 + 'oodd_model_binary_url': (str,), # noqa: E501 + 'pipeline_config': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'oodd_pipeline_config': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'predictor_metadata': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "model_binary_id": "model_binary_id", # noqa: E501 - "model_binary_url": "model_binary_url", # noqa: E501 - "oodd_model_binary_id": "oodd_model_binary_id", # noqa: E501 - "oodd_model_binary_url": "oodd_model_binary_url", # noqa: E501 - "pipeline_config": "pipeline_config", # noqa: E501 - "oodd_pipeline_config": "oodd_pipeline_config", # noqa: E501 - "predictor_metadata": "predictor_metadata", # noqa: E501 + 'model_binary_id': 'model_binary_id', # noqa: E501 + 'model_binary_url': 'model_binary_url', # noqa: E501 + 'oodd_model_binary_id': 'oodd_model_binary_id', # noqa: E501 + 'oodd_model_binary_url': 'oodd_model_binary_url', # noqa: E501 + 'pipeline_config': 'pipeline_config', # noqa: E501 + 'oodd_pipeline_config': 'oodd_pipeline_config', # noqa: E501 + 'predictor_metadata': 'predictor_metadata', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -190,18 +156,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 predictor_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -217,24 +182,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -281,16 +244,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 predictor_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -306,17 +268,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/escalation_type_enum.py b/generated/groundlight_openapi_client/model/escalation_type_enum.py index 2b80360e..505bba48 100644 --- a/generated/groundlight_openapi_client/model/escalation_type_enum.py +++ b/generated/groundlight_openapi_client/model/escalation_type_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class EscalationTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,13 +52,14 @@ class EscalationTypeEnum(ModelSimple): """ allowed_values = { - ("value",): { - "STANDARD": "STANDARD", - "NO_HUMAN_LABELING": "NO_HUMAN_LABELING", + ('value',): { + 'STANDARD': "STANDARD", + 'NO_HUMAN_LABELING': "NO_HUMAN_LABELING", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -73,13 +76,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -87,12 +91,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -138,10 +142,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -152,15 +156,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,8 +180,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -230,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -246,15 +248,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -271,8 +272,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/image_query.py b/generated/groundlight_openapi_client/model/image_query.py index 79cf0179..92df5eeb 100644 --- a/generated/groundlight_openapi_client/model/image_query.py +++ b/generated/groundlight_openapi_client/model/image_query.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -38,15 +39,14 @@ def lazy_import(): from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum from groundlight_openapi_client.model.roi import ROI from groundlight_openapi_client.model.text_recognition_result import TextRecognitionResult - - globals()["BinaryClassificationResult"] = BinaryClassificationResult - globals()["BoundingBoxResult"] = BoundingBoxResult - globals()["CountingResult"] = CountingResult - globals()["ImageQueryTypeEnum"] = ImageQueryTypeEnum - globals()["MultiClassificationResult"] = MultiClassificationResult - globals()["ROI"] = ROI - globals()["ResultTypeEnum"] = ResultTypeEnum - globals()["TextRecognitionResult"] = TextRecognitionResult + globals()['BinaryClassificationResult'] = BinaryClassificationResult + globals()['BoundingBoxResult'] = BoundingBoxResult + globals()['CountingResult'] = CountingResult + globals()['ImageQueryTypeEnum'] = ImageQueryTypeEnum + globals()['MultiClassificationResult'] = MultiClassificationResult + globals()['ROI'] = ROI + globals()['ResultTypeEnum'] = ResultTypeEnum + globals()['TextRecognitionResult'] = TextRecognitionResult class ImageQuery(ModelNormal): @@ -73,9 +73,11 @@ class ImageQuery(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -84,17 +86,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -110,115 +102,61 @@ def openapi_types(): """ lazy_import() return { - "metadata": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "id": (str,), # noqa: E501 - "type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "query": (str,), # noqa: E501 - "detector_id": (str,), # noqa: E501 - "result_type": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "result": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "patience_time": (float,), # noqa: E501 - "confidence_threshold": (float,), # noqa: E501 - "rois": ( - [ROI], - none_type, - ), # noqa: E501 - "text": ( - str, - none_type, - ), # noqa: E501 - "done_processing": (bool,), # noqa: E501 + 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'query': (str,), # noqa: E501 + 'detector_id': (str,), # noqa: E501 + 'result_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'result': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'patience_time': (float,), # noqa: E501 + 'confidence_threshold': (float,), # noqa: E501 + 'rois': ([ROI], none_type,), # noqa: E501 + 'text': (str, none_type,), # noqa: E501 + 'done_processing': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "metadata": "metadata", # noqa: E501 - "id": "id", # noqa: E501 - "type": "type", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "query": "query", # noqa: E501 - "detector_id": "detector_id", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "result": "result", # noqa: E501 - "patience_time": "patience_time", # noqa: E501 - "confidence_threshold": "confidence_threshold", # noqa: E501 - "rois": "rois", # noqa: E501 - "text": "text", # noqa: E501 - "done_processing": "done_processing", # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'query': 'query', # noqa: E501 + 'detector_id': 'detector_id', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'result': 'result', # noqa: E501 + 'patience_time': 'patience_time', # noqa: E501 + 'confidence_threshold': 'confidence_threshold', # noqa: E501 + 'rois': 'rois', # noqa: E501 + 'text': 'text', # noqa: E501 + 'done_processing': 'done_processing', # noqa: E501 } read_only_vars = { - "metadata", # noqa: E501 - "id", # noqa: E501 - "type", # noqa: E501 - "created_at", # noqa: E501 - "query", # noqa: E501 - "detector_id", # noqa: E501 - "result_type", # noqa: E501 - "patience_time", # noqa: E501 - "confidence_threshold", # noqa: E501 - "rois", # noqa: E501 - "text", # noqa: E501 + 'metadata', # noqa: E501 + 'id', # noqa: E501 + 'type', # noqa: E501 + 'created_at', # noqa: E501 + 'query', # noqa: E501 + 'detector_id', # noqa: E501 + 'result_type', # noqa: E501 + 'patience_time', # noqa: E501 + 'confidence_threshold', # noqa: E501 + 'rois', # noqa: E501 + 'text', # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, - metadata, - id, - type, - created_at, - query, - detector_id, - result_type, - result, - patience_time, - confidence_threshold, - rois, - text, - *args, - **kwargs, - ): # noqa: E501 + def _from_openapi_data(cls, metadata, id, type, created_at, query, detector_id, result_type, result, patience_time, confidence_threshold, rois, text, *args, **kwargs): # noqa: E501 """ImageQuery - a model defined in OpenAPI Args: @@ -269,18 +207,17 @@ def _from_openapi_data( done_processing (bool): EDGE ONLY - Whether the image query has completed escalating and will receive no new results.. [optional] if omitted the server will use the default value of False # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -308,24 +245,22 @@ def _from_openapi_data( self.rois = rois self.text = text for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -367,16 +302,15 @@ def __init__(self, result, *args, **kwargs): # noqa: E501 done_processing (bool): EDGE ONLY - Whether the image query has completed escalating and will receive no new results.. [optional] if omitted the server will use the default value of False # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -393,17 +327,13 @@ def __init__(self, result, *args, **kwargs): # noqa: E501 self.result = result for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/image_query_type_enum.py b/generated/groundlight_openapi_client/model/image_query_type_enum.py index 42470730..41939968 100644 --- a/generated/groundlight_openapi_client/model/image_query_type_enum.py +++ b/generated/groundlight_openapi_client/model/image_query_type_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class ImageQueryTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,12 +52,13 @@ class ImageQueryTypeEnum(ModelSimple): """ allowed_values = { - ("value",): { - "IMAGE_QUERY": "image_query", + ('value',): { + 'IMAGE_QUERY': "image_query", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -72,13 +75,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -86,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -137,25 +141,24 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "image_query" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -172,8 +175,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -225,27 +227,26 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) else: value = "image_query" - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -262,8 +263,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/inline_response200.py b/generated/groundlight_openapi_client/model/inline_response200.py index 62e2494f..1810e3d4 100644 --- a/generated/groundlight_openapi_client/model/inline_response200.py +++ b/generated/groundlight_openapi_client/model/inline_response200.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.inline_response200_summary import InlineResponse200Summary - - globals()["InlineResponse200Summary"] = InlineResponse200Summary + globals()['InlineResponse200Summary'] = InlineResponse200Summary class InlineResponse200(ModelNormal): @@ -59,9 +59,11 @@ class InlineResponse200(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,18 +88,20 @@ def openapi_types(): """ lazy_import() return { - "summary": (InlineResponse200Summary,), # noqa: E501 + 'summary': (InlineResponse200Summary,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "summary": "summary", # noqa: E501 + 'summary': 'summary', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -150,18 +144,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary (InlineResponse200Summary): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,24 +170,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -235,16 +226,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary (InlineResponse200Summary): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -260,17 +250,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/inline_response2001.py b/generated/groundlight_openapi_client/model/inline_response2001.py index cdb30032..e859dec3 100644 --- a/generated/groundlight_openapi_client/model/inline_response2001.py +++ b/generated/groundlight_openapi_client/model/inline_response2001.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,17 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from groundlight_openapi_client.model.inline_response2001_evaluation_results import ( - InlineResponse2001EvaluationResults, - ) - - globals()["InlineResponse2001EvaluationResults"] = InlineResponse2001EvaluationResults + from groundlight_openapi_client.model.inline_response2001_evaluation_results import InlineResponse2001EvaluationResults + globals()['InlineResponse2001EvaluationResults'] = InlineResponse2001EvaluationResults class InlineResponse2001(ModelNormal): @@ -61,9 +59,11 @@ class InlineResponse2001(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -72,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -98,18 +88,20 @@ def openapi_types(): """ lazy_import() return { - "evaluation_results": (InlineResponse2001EvaluationResults,), # noqa: E501 + 'evaluation_results': (InlineResponse2001EvaluationResults,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "evaluation_results": "evaluation_results", # noqa: E501 + 'evaluation_results': 'evaluation_results', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -152,18 +144,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 evaluation_results (InlineResponse2001EvaluationResults): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -179,24 +170,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -237,16 +226,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 evaluation_results (InlineResponse2001EvaluationResults): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -262,17 +250,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py index 9ee33a84..52864916 100644 --- a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py +++ b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class InlineResponse2001EvaluationResults(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class InlineResponse2001EvaluationResults(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = True @@ -88,105 +82,56 @@ def openapi_types(): and the value is attribute type. """ return { - "eval_timestamp": (datetime,), # noqa: E501 - "total_ground_truth_examples": ( - int, - none_type, - ), # noqa: E501 - "total_labeled_examples": ( - int, - none_type, - ), # noqa: E501 - "kfold_pooled__balanced_accuracy": (float,), # noqa: E501 - "kfold_pooled__positive_accuracy": ( - float, - none_type, - ), # noqa: E501 - "kfold_pooled__negative_accuracy": ( - float, - none_type, - ), # noqa: E501 - "precision__mean": ( - float, - none_type, - ), # noqa: E501 - "recall__mean": ( - float, - none_type, - ), # noqa: E501 - "roc_auc__mean": ( - float, - none_type, - ), # noqa: E501 - "balanced_system_accuracies": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "positive_system_accuracies": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "negative_system_accuracies": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "mean_absolute_error__mean": ( - float, - none_type, - ), # noqa: E501 - "objdet_precision__mean": ( - float, - none_type, - ), # noqa: E501 - "objdet_recall__mean": ( - float, - none_type, - ), # noqa: E501 - "objdet_f1_score__mean": ( - float, - none_type, - ), # noqa: E501 - "class_accuracies": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "confusion_dict": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "num_examples_per_class": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 + 'eval_timestamp': (datetime,), # noqa: E501 + 'total_ground_truth_examples': (int, none_type,), # noqa: E501 + 'total_labeled_examples': (int, none_type,), # noqa: E501 + 'kfold_pooled__balanced_accuracy': (float,), # noqa: E501 + 'kfold_pooled__positive_accuracy': (float, none_type,), # noqa: E501 + 'kfold_pooled__negative_accuracy': (float, none_type,), # noqa: E501 + 'precision__mean': (float, none_type,), # noqa: E501 + 'recall__mean': (float, none_type,), # noqa: E501 + 'roc_auc__mean': (float, none_type,), # noqa: E501 + 'balanced_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'positive_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'negative_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'mean_absolute_error__mean': (float, none_type,), # noqa: E501 + 'objdet_precision__mean': (float, none_type,), # noqa: E501 + 'objdet_recall__mean': (float, none_type,), # noqa: E501 + 'objdet_f1_score__mean': (float, none_type,), # noqa: E501 + 'class_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'confusion_dict': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'num_examples_per_class': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "eval_timestamp": "eval_timestamp", # noqa: E501 - "total_ground_truth_examples": "total_ground_truth_examples", # noqa: E501 - "total_labeled_examples": "total_labeled_examples", # noqa: E501 - "kfold_pooled__balanced_accuracy": "kfold_pooled__balanced_accuracy", # noqa: E501 - "kfold_pooled__positive_accuracy": "kfold_pooled__positive_accuracy", # noqa: E501 - "kfold_pooled__negative_accuracy": "kfold_pooled__negative_accuracy", # noqa: E501 - "precision__mean": "precision__mean", # noqa: E501 - "recall__mean": "recall__mean", # noqa: E501 - "roc_auc__mean": "roc_auc__mean", # noqa: E501 - "balanced_system_accuracies": "balanced_system_accuracies", # noqa: E501 - "positive_system_accuracies": "positive_system_accuracies", # noqa: E501 - "negative_system_accuracies": "negative_system_accuracies", # noqa: E501 - "mean_absolute_error__mean": "mean_absolute_error__mean", # noqa: E501 - "objdet_precision__mean": "objdet_precision__mean", # noqa: E501 - "objdet_recall__mean": "objdet_recall__mean", # noqa: E501 - "objdet_f1_score__mean": "objdet_f1_score__mean", # noqa: E501 - "class_accuracies": "class_accuracies", # noqa: E501 - "confusion_dict": "confusion_dict", # noqa: E501 - "num_examples_per_class": "num_examples_per_class", # noqa: E501 + 'eval_timestamp': 'eval_timestamp', # noqa: E501 + 'total_ground_truth_examples': 'total_ground_truth_examples', # noqa: E501 + 'total_labeled_examples': 'total_labeled_examples', # noqa: E501 + 'kfold_pooled__balanced_accuracy': 'kfold_pooled__balanced_accuracy', # noqa: E501 + 'kfold_pooled__positive_accuracy': 'kfold_pooled__positive_accuracy', # noqa: E501 + 'kfold_pooled__negative_accuracy': 'kfold_pooled__negative_accuracy', # noqa: E501 + 'precision__mean': 'precision__mean', # noqa: E501 + 'recall__mean': 'recall__mean', # noqa: E501 + 'roc_auc__mean': 'roc_auc__mean', # noqa: E501 + 'balanced_system_accuracies': 'balanced_system_accuracies', # noqa: E501 + 'positive_system_accuracies': 'positive_system_accuracies', # noqa: E501 + 'negative_system_accuracies': 'negative_system_accuracies', # noqa: E501 + 'mean_absolute_error__mean': 'mean_absolute_error__mean', # noqa: E501 + 'objdet_precision__mean': 'objdet_precision__mean', # noqa: E501 + 'objdet_recall__mean': 'objdet_recall__mean', # noqa: E501 + 'objdet_f1_score__mean': 'objdet_f1_score__mean', # noqa: E501 + 'class_accuracies': 'class_accuracies', # noqa: E501 + 'confusion_dict': 'confusion_dict', # noqa: E501 + 'num_examples_per_class': 'num_examples_per_class', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -247,18 +192,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -274,24 +218,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -350,16 +292,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -375,17 +316,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/inline_response2002.py b/generated/groundlight_openapi_client/model/inline_response2002.py index 1fbfd51d..be8dc03e 100644 --- a/generated/groundlight_openapi_client/model/inline_response2002.py +++ b/generated/groundlight_openapi_client/model/inline_response2002.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class InlineResponse2002(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class InlineResponse2002(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,18 +82,20 @@ def openapi_types(): and the value is attribute type. """ return { - "username": (str,), # noqa: E501 + 'username': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "username": "username", # noqa: E501 + 'username': 'username', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -142,18 +138,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 username (str): The user's username. [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -169,24 +164,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -227,16 +220,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 username (str): The user's username. [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -252,17 +244,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/inline_response200_summary.py b/generated/groundlight_openapi_client/model/inline_response200_summary.py index d5c30a12..61601c59 100644 --- a/generated/groundlight_openapi_client/model/inline_response200_summary.py +++ b/generated/groundlight_openapi_client/model/inline_response200_summary.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,17 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from groundlight_openapi_client.model.inline_response200_summary_class_counts import ( - InlineResponse200SummaryClassCounts, - ) - - globals()["InlineResponse200SummaryClassCounts"] = InlineResponse200SummaryClassCounts + from groundlight_openapi_client.model.inline_response200_summary_class_counts import InlineResponse200SummaryClassCounts + globals()['InlineResponse200SummaryClassCounts'] = InlineResponse200SummaryClassCounts class InlineResponse200Summary(ModelNormal): @@ -61,9 +59,11 @@ class InlineResponse200Summary(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -72,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = True @@ -98,28 +88,28 @@ def openapi_types(): """ lazy_import() return { - "num_ground_truth": (int,), # noqa: E501 - "num_current_source_human": (int,), # noqa: E501 - "class_counts": (InlineResponse200SummaryClassCounts,), # noqa: E501 - "unconfident_counts": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - ), # noqa: E501 - "total_iqs": (int,), # noqa: E501 + 'num_ground_truth': (int,), # noqa: E501 + 'num_current_source_human': (int,), # noqa: E501 + 'class_counts': (InlineResponse200SummaryClassCounts,), # noqa: E501 + 'unconfident_counts': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'total_iqs': (int,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "num_ground_truth": "num_ground_truth", # noqa: E501 - "num_current_source_human": "num_current_source_human", # noqa: E501 - "class_counts": "class_counts", # noqa: E501 - "unconfident_counts": "unconfident_counts", # noqa: E501 - "total_iqs": "total_iqs", # noqa: E501 + 'num_ground_truth': 'num_ground_truth', # noqa: E501 + 'num_current_source_human': 'num_current_source_human', # noqa: E501 + 'class_counts': 'class_counts', # noqa: E501 + 'unconfident_counts': 'unconfident_counts', # noqa: E501 + 'total_iqs': 'total_iqs', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -166,18 +156,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 total_iqs (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -193,24 +182,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -255,16 +242,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 total_iqs (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -280,17 +266,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py b/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py index b2eb180b..49f7d401 100644 --- a/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py +++ b/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class InlineResponse200SummaryClassCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class InlineResponse200SummaryClassCounts(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,26 +82,28 @@ def openapi_types(): and the value is attribute type. """ return { - "source_ml": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - "source_human": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - "cloud_labeler": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - "cloud": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - "total": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'source_ml': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'source_human': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'cloud_labeler': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'cloud': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'total': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "source_ml": "source_ml", # noqa: E501 - "source_human": "source_human", # noqa: E501 - "cloud_labeler": "cloud_labeler", # noqa: E501 - "cloud": "cloud", # noqa: E501 - "total": "total", # noqa: E501 + 'source_ml': 'source_ml', # noqa: E501 + 'source_human': 'source_human', # noqa: E501 + 'cloud_labeler': 'cloud_labeler', # noqa: E501 + 'cloud': 'cloud', # noqa: E501 + 'total': 'total', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -154,18 +150,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 total ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -181,24 +176,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -243,16 +236,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 total ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -268,17 +260,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/label.py b/generated/groundlight_openapi_client/model/label.py index 810b9e2e..cc19ad47 100644 --- a/generated/groundlight_openapi_client/model/label.py +++ b/generated/groundlight_openapi_client/model/label.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class Label(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,14 +52,15 @@ class Label(ModelSimple): """ allowed_values = { - ("value",): { - "YES": "YES", - "NO": "NO", - "UNCLEAR": "UNCLEAR", + ('value',): { + 'YES': "YES", + 'NO': "NO", + 'UNCLEAR': "UNCLEAR", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -74,13 +77,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -88,12 +92,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -139,10 +143,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -153,15 +157,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -178,8 +181,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -231,12 +233,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -247,15 +249,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -272,8 +273,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/label_value.py b/generated/groundlight_openapi_client/model/label_value.py index ee9b73e9..12324f28 100644 --- a/generated/groundlight_openapi_client/model/label_value.py +++ b/generated/groundlight_openapi_client/model/label_value.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.roi import ROI - - globals()["ROI"] = ROI + globals()['ROI'] = ROI class LabelValue(ModelNormal): @@ -59,9 +59,11 @@ class LabelValue(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,63 +88,47 @@ def openapi_types(): """ lazy_import() return { - "confidence": ( - float, - none_type, - ), # noqa: E501 - "class_name": ( - str, - none_type, - ), # noqa: E501 - "annotations_requested": ([str],), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "detector_id": ( - int, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "text": ( - str, - none_type, - ), # noqa: E501 - "rois": ( - [ROI], - none_type, - ), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'class_name': (str, none_type,), # noqa: E501 + 'annotations_requested': ([str],), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'detector_id': (int, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'text': (str, none_type,), # noqa: E501 + 'rois': ([ROI], none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "confidence": "confidence", # noqa: E501 - "class_name": "class_name", # noqa: E501 - "annotations_requested": "annotations_requested", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "detector_id": "detector_id", # noqa: E501 - "source": "source", # noqa: E501 - "text": "text", # noqa: E501 - "rois": "rois", # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'class_name': 'class_name', # noqa: E501 + 'annotations_requested': 'annotations_requested', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'detector_id': 'detector_id', # noqa: E501 + 'source': 'source', # noqa: E501 + 'text': 'text', # noqa: E501 + 'rois': 'rois', # noqa: E501 } read_only_vars = { - "confidence", # noqa: E501 - "class_name", # noqa: E501 - "annotations_requested", # noqa: E501 - "created_at", # noqa: E501 - "detector_id", # noqa: E501 - "source", # noqa: E501 - "text", # noqa: E501 + 'confidence', # noqa: E501 + 'class_name', # noqa: E501 + 'annotations_requested', # noqa: E501 + 'created_at', # noqa: E501 + 'detector_id', # noqa: E501 + 'source', # noqa: E501 + 'text', # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, confidence, class_name, annotations_requested, created_at, detector_id, source, text, *args, **kwargs - ): # noqa: E501 + def _from_openapi_data(cls, confidence, class_name, annotations_requested, created_at, detector_id, source, text, *args, **kwargs): # noqa: E501 """LabelValue - a model defined in OpenAPI Args: @@ -198,18 +174,17 @@ def _from_openapi_data( rois ([ROI], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -232,24 +207,22 @@ def _from_openapi_data( self.source = source self.text = text for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -290,16 +263,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 rois ([ROI], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -315,17 +287,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/label_value_request.py b/generated/groundlight_openapi_client/model/label_value_request.py index 434f8ad8..ab086120 100644 --- a/generated/groundlight_openapi_client/model/label_value_request.py +++ b/generated/groundlight_openapi_client/model/label_value_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.roi_request import ROIRequest - - globals()["ROIRequest"] = ROIRequest + globals()['ROIRequest'] = ROIRequest class LabelValueRequest(ModelNormal): @@ -59,11 +59,12 @@ class LabelValueRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("image_query_id",): { - "min_length": 1, + ('image_query_id',): { + 'min_length': 1, }, } @@ -74,17 +75,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -100,28 +91,24 @@ def openapi_types(): """ lazy_import() return { - "label": ( - str, - none_type, - ), # noqa: E501 - "image_query_id": (str,), # noqa: E501 - "rois": ( - [ROIRequest], - none_type, - ), # noqa: E501 + 'label': (str, none_type,), # noqa: E501 + 'image_query_id': (str,), # noqa: E501 + 'rois': ([ROIRequest], none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "image_query_id": "image_query_id", # noqa: E501 - "rois": "rois", # noqa: E501 + 'label': 'label', # noqa: E501 + 'image_query_id': 'image_query_id', # noqa: E501 + 'rois': 'rois', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -168,18 +155,17 @@ def _from_openapi_data(cls, label, image_query_id, *args, **kwargs): # noqa: E5 rois ([ROIRequest], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -197,24 +183,22 @@ def _from_openapi_data(cls, label, image_query_id, *args, **kwargs): # noqa: E5 self.label = label self.image_query_id = image_query_id for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -259,16 +243,15 @@ def __init__(self, label, image_query_id, *args, **kwargs): # noqa: E501 rois ([ROIRequest], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +269,13 @@ def __init__(self, label, image_query_id, *args, **kwargs): # noqa: E501 self.label = label self.image_query_id = image_query_id for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/mode_enum.py b/generated/groundlight_openapi_client/model/mode_enum.py index b35a3833..5b1b2594 100644 --- a/generated/groundlight_openapi_client/model/mode_enum.py +++ b/generated/groundlight_openapi_client/model/mode_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class ModeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,16 +52,17 @@ class ModeEnum(ModelSimple): """ allowed_values = { - ("value",): { - "BINARY": "BINARY", - "COUNT": "COUNT", - "MULTI_CLASS": "MULTI_CLASS", - "TEXT": "TEXT", - "BOUNDING_BOX": "BOUNDING_BOX", + ('value',): { + 'BINARY': "BINARY", + 'COUNT': "COUNT", + 'MULTI_CLASS': "MULTI_CLASS", + 'TEXT': "TEXT", + 'BOUNDING_BOX': "BOUNDING_BOX", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -76,13 +79,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -90,12 +94,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -141,10 +145,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -155,15 +159,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -180,8 +183,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -233,12 +235,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -249,15 +251,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -274,8 +275,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py b/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py index f08ee27c..1755866c 100644 --- a/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class MultiClassModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class MultiClassModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,20 +82,22 @@ def openapi_types(): and the value is attribute type. """ return { - "class_names": ([str],), # noqa: E501 - "num_classes": (int,), # noqa: E501 + 'class_names': ([str],), # noqa: E501 + 'num_classes': (int,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "class_names": "class_names", # noqa: E501 - "num_classes": "num_classes", # noqa: E501 + 'class_names': 'class_names', # noqa: E501 + 'num_classes': 'num_classes', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -147,18 +143,17 @@ def _from_openapi_data(cls, class_names, *args, **kwargs): # noqa: E501 num_classes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -175,24 +170,22 @@ def _from_openapi_data(cls, class_names, *args, **kwargs): # noqa: E501 self.class_names = class_names for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -236,16 +229,15 @@ def __init__(self, class_names, *args, **kwargs): # noqa: E501 num_classes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -262,17 +254,13 @@ def __init__(self, class_names, *args, **kwargs): # noqa: E501 self.class_names = class_names for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/multi_classification_result.py b/generated/groundlight_openapi_client/model/multi_classification_result.py index bfc778c5..1620d757 100644 --- a/generated/groundlight_openapi_client/model/multi_classification_result.py +++ b/generated/groundlight_openapi_client/model/multi_classification_result.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class MultiClassificationResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,15 +56,15 @@ class MultiClassificationResult(ModelNormal): """ allowed_values = { - ("result_type",): { - "MULTI_CLASSIFICATION": "multi_classification", + ('result_type',): { + 'MULTI_CLASSIFICATION': "multi_classification", }, } validations = { - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -72,17 +74,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -97,29 +89,28 @@ def openapi_types(): and the value is attribute type. """ return { - "label": (str,), # noqa: E501 - "confidence": ( - float, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "result_type": (str,), # noqa: E501 - "from_edge": (bool,), # noqa: E501 + 'label': (str,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'result_type': (str,), # noqa: E501 + 'from_edge': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "source": "source", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "from_edge": "from_edge", # noqa: E501 + 'label': 'label', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'source': 'source', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'from_edge': 'from_edge', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -168,18 +159,17 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +186,22 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -260,16 +248,15 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +273,13 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/note.py b/generated/groundlight_openapi_client/model/note.py index 64f139a7..28479f35 100644 --- a/generated/groundlight_openapi_client/model/note.py +++ b/generated/groundlight_openapi_client/model/note.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class Note(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class Note(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,29 +82,24 @@ def openapi_types(): and the value is attribute type. """ return { - "detector_id": (str,), # noqa: E501 - "content": ( - str, - none_type, - ), # noqa: E501 - "is_pinned": ( - bool, - none_type, - ), # noqa: E501 + 'detector_id': (str,), # noqa: E501 + 'content': (str, none_type,), # noqa: E501 + 'is_pinned': (bool, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "detector_id": "detector_id", # noqa: E501 - "content": "content", # noqa: E501 - "is_pinned": "is_pinned", # noqa: E501 + 'detector_id': 'detector_id', # noqa: E501 + 'content': 'content', # noqa: E501 + 'is_pinned': 'is_pinned', # noqa: E501 } read_only_vars = { - "detector_id", # noqa: E501 + 'detector_id', # noqa: E501 } _composed_schemas = {} @@ -158,18 +147,17 @@ def _from_openapi_data(cls, detector_id, *args, **kwargs): # noqa: E501 is_pinned (bool, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -186,24 +174,22 @@ def _from_openapi_data(cls, detector_id, *args, **kwargs): # noqa: E501 self.detector_id = detector_id for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -245,16 +231,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 is_pinned (bool, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -270,17 +255,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/note_request.py b/generated/groundlight_openapi_client/model/note_request.py index 95889010..67063709 100644 --- a/generated/groundlight_openapi_client/model/note_request.py +++ b/generated/groundlight_openapi_client/model/note_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class NoteRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class NoteRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,31 +82,24 @@ def openapi_types(): and the value is attribute type. """ return { - "content": ( - str, - none_type, - ), # noqa: E501 - "is_pinned": ( - bool, - none_type, - ), # noqa: E501 - "image": ( - file_type, - none_type, - ), # noqa: E501 + 'content': (str, none_type,), # noqa: E501 + 'is_pinned': (bool, none_type,), # noqa: E501 + 'image': (file_type, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "content": "content", # noqa: E501 - "is_pinned": "is_pinned", # noqa: E501 - "image": "image", # noqa: E501 + 'content': 'content', # noqa: E501 + 'is_pinned': 'is_pinned', # noqa: E501 + 'image': 'image', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -157,18 +144,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 image (file_type, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -184,24 +170,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -244,16 +228,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 image (file_type, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -269,17 +252,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/paginated_detector_list.py b/generated/groundlight_openapi_client/model/paginated_detector_list.py index 5972205e..391aad23 100644 --- a/generated/groundlight_openapi_client/model/paginated_detector_list.py +++ b/generated/groundlight_openapi_client/model/paginated_detector_list.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.detector import Detector - - globals()["Detector"] = Detector + globals()['Detector'] = Detector class PaginatedDetectorList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedDetectorList(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,30 +88,26 @@ def openapi_types(): """ lazy_import() return { - "count": (int,), # noqa: E501 - "results": ([Detector],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([Detector],), # noqa: E501 + 'next': (str, none_type,), # noqa: E501 + 'previous': (str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "count": "count", # noqa: E501 - "results": "results", # noqa: E501 - "next": "next", # noqa: E501 - "previous": "previous", # noqa: E501 + 'count': 'count', # noqa: E501 + 'results': 'results', # noqa: E501 + 'next': 'next', # noqa: E501 + 'previous': 'previous', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -167,18 +155,17 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +183,22 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -259,16 +244,15 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +270,13 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/paginated_image_query_list.py b/generated/groundlight_openapi_client/model/paginated_image_query_list.py index 13dccab7..d8c7cc17 100644 --- a/generated/groundlight_openapi_client/model/paginated_image_query_list.py +++ b/generated/groundlight_openapi_client/model/paginated_image_query_list.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.image_query import ImageQuery - - globals()["ImageQuery"] = ImageQuery + globals()['ImageQuery'] = ImageQuery class PaginatedImageQueryList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedImageQueryList(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,30 +88,26 @@ def openapi_types(): """ lazy_import() return { - "count": (int,), # noqa: E501 - "results": ([ImageQuery],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([ImageQuery],), # noqa: E501 + 'next': (str, none_type,), # noqa: E501 + 'previous': (str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "count": "count", # noqa: E501 - "results": "results", # noqa: E501 - "next": "next", # noqa: E501 - "previous": "previous", # noqa: E501 + 'count': 'count', # noqa: E501 + 'results': 'results', # noqa: E501 + 'next': 'next', # noqa: E501 + 'previous': 'previous', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -167,18 +155,17 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +183,22 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -259,16 +244,15 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +270,13 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/paginated_rule_list.py b/generated/groundlight_openapi_client/model/paginated_rule_list.py index 6d007e1d..7102f4eb 100644 --- a/generated/groundlight_openapi_client/model/paginated_rule_list.py +++ b/generated/groundlight_openapi_client/model/paginated_rule_list.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.rule import Rule - - globals()["Rule"] = Rule + globals()['Rule'] = Rule class PaginatedRuleList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedRuleList(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,30 +88,26 @@ def openapi_types(): """ lazy_import() return { - "count": (int,), # noqa: E501 - "results": ([Rule],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([Rule],), # noqa: E501 + 'next': (str, none_type,), # noqa: E501 + 'previous': (str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "count": "count", # noqa: E501 - "results": "results", # noqa: E501 - "next": "next", # noqa: E501 - "previous": "previous", # noqa: E501 + 'count': 'count', # noqa: E501 + 'results': 'results', # noqa: E501 + 'next': 'next', # noqa: E501 + 'previous': 'previous', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -167,18 +155,17 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -196,24 +183,22 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -259,16 +244,15 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -286,17 +270,13 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 7e7a5813..06e8f5a7 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -32,9 +33,8 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.status_enum import StatusEnum - - globals()["BlankEnum"] = BlankEnum - globals()["StatusEnum"] = StatusEnum + globals()['BlankEnum'] = BlankEnum + globals()['StatusEnum'] = StatusEnum class PatchedDetectorRequest(ModelNormal): @@ -61,23 +61,24 @@ class PatchedDetectorRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 200, - "min_length": 1, + ('name',): { + 'max_length': 200, + 'min_length': 1, }, - ("confidence_threshold",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence_threshold',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, - ("patience_time",): { - "inclusive_maximum": 3600, - "inclusive_minimum": 0, + ('patience_time',): { + 'inclusive_maximum': 3600, + 'inclusive_minimum': 0, }, - ("escalation_type",): { - "min_length": 1, + ('escalation_type',): { + 'min_length': 1, }, } @@ -88,17 +89,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -114,36 +105,28 @@ def openapi_types(): """ lazy_import() return { - "name": (str,), # noqa: E501 - "confidence_threshold": (float,), # noqa: E501 - "patience_time": (float,), # noqa: E501 - "status": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "escalation_type": (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'confidence_threshold': (float,), # noqa: E501 + 'patience_time': (float,), # noqa: E501 + 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'escalation_type': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "confidence_threshold": "confidence_threshold", # noqa: E501 - "patience_time": "patience_time", # noqa: E501 - "status": "status", # noqa: E501 - "escalation_type": "escalation_type", # noqa: E501 + 'name': 'name', # noqa: E501 + 'confidence_threshold': 'confidence_threshold', # noqa: E501 + 'patience_time': 'patience_time', # noqa: E501 + 'status': 'status', # noqa: E501 + 'escalation_type': 'escalation_type', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -190,18 +173,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -217,24 +199,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -279,16 +259,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -304,17 +283,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/payload_template.py b/generated/groundlight_openapi_client/model/payload_template.py index a721bb4c..d3037a5a 100644 --- a/generated/groundlight_openapi_client/model/payload_template.py +++ b/generated/groundlight_openapi_client/model/payload_template.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class PayloadTemplate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class PayloadTemplate(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -63,17 +67,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -88,23 +82,22 @@ def openapi_types(): and the value is attribute type. """ return { - "template": (str,), # noqa: E501 - "headers": ( - {str: (str,)}, - none_type, - ), # noqa: E501 + 'template': (str,), # noqa: E501 + 'headers': ({str: (str,)}, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "template": "template", # noqa: E501 - "headers": "headers", # noqa: E501 + 'template': 'template', # noqa: E501 + 'headers': 'headers', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -150,18 +143,17 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -178,24 +170,22 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -239,16 +229,15 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -265,17 +254,13 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/payload_template_request.py b/generated/groundlight_openapi_client/model/payload_template_request.py index 3a0f12a2..343ac2ed 100644 --- a/generated/groundlight_openapi_client/model/payload_template_request.py +++ b/generated/groundlight_openapi_client/model/payload_template_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class PayloadTemplateRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,11 +55,12 @@ class PayloadTemplateRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("template",): { - "min_length": 1, + ('template',): { + 'min_length': 1, }, } @@ -67,17 +70,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -92,23 +85,22 @@ def openapi_types(): and the value is attribute type. """ return { - "template": (str,), # noqa: E501 - "headers": ( - {str: (str,)}, - none_type, - ), # noqa: E501 + 'template': (str,), # noqa: E501 + 'headers': ({str: (str,)}, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "template": "template", # noqa: E501 - "headers": "headers", # noqa: E501 + 'template': 'template', # noqa: E501 + 'headers': 'headers', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -154,18 +146,17 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -182,24 +173,22 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -243,16 +232,15 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -269,17 +257,13 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/result_type_enum.py b/generated/groundlight_openapi_client/model/result_type_enum.py index c4b954fd..a2b7a7c6 100644 --- a/generated/groundlight_openapi_client/model/result_type_enum.py +++ b/generated/groundlight_openapi_client/model/result_type_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class ResultTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,16 +52,17 @@ class ResultTypeEnum(ModelSimple): """ allowed_values = { - ("value",): { - "BINARY_CLASSIFICATION": "binary_classification", - "COUNTING": "counting", - "MULTI_CLASSIFICATION": "multi_classification", - "TEXT_RECOGNITION": "text_recognition", - "BOUNDING_BOX": "bounding_box", + ('value',): { + 'BINARY_CLASSIFICATION': "binary_classification", + 'COUNTING': "counting", + 'MULTI_CLASSIFICATION': "multi_classification", + 'TEXT_RECOGNITION': "text_recognition", + 'BOUNDING_BOX': "bounding_box", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -76,13 +79,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -90,12 +94,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -141,10 +145,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -155,15 +159,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -180,8 +183,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -233,12 +235,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -249,15 +251,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -274,8 +275,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/roi.py b/generated/groundlight_openapi_client/model/roi.py index 74c4fc66..368b00de 100644 --- a/generated/groundlight_openapi_client/model/roi.py +++ b/generated/groundlight_openapi_client/model/roi.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.b_box_geometry import BBoxGeometry - - globals()["BBoxGeometry"] = BBoxGeometry + globals()['BBoxGeometry'] = BBoxGeometry class ROI(ModelNormal): @@ -59,9 +59,11 @@ class ROI(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -70,17 +72,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -96,23 +88,24 @@ def openapi_types(): """ lazy_import() return { - "label": (str,), # noqa: E501 - "score": (float,), # noqa: E501 - "geometry": (BBoxGeometry,), # noqa: E501 + 'label': (str,), # noqa: E501 + 'score': (float,), # noqa: E501 + 'geometry': (BBoxGeometry,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "score": "score", # noqa: E501 - "geometry": "geometry", # noqa: E501 + 'label': 'label', # noqa: E501 + 'score': 'score', # noqa: E501 + 'geometry': 'geometry', # noqa: E501 } read_only_vars = { - "score", # noqa: E501 + 'score', # noqa: E501 } _composed_schemas = {} @@ -160,18 +153,17 @@ def _from_openapi_data(cls, label, score, geometry, *args, **kwargs): # noqa: E _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -190,24 +182,22 @@ def _from_openapi_data(cls, label, score, geometry, *args, **kwargs): # noqa: E self.score = score self.geometry = geometry for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -251,16 +241,15 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -278,17 +267,13 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/roi_request.py b/generated/groundlight_openapi_client/model/roi_request.py index 07fb54e2..14918a8f 100644 --- a/generated/groundlight_openapi_client/model/roi_request.py +++ b/generated/groundlight_openapi_client/model/roi_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.b_box_geometry_request import BBoxGeometryRequest - - globals()["BBoxGeometryRequest"] = BBoxGeometryRequest + globals()['BBoxGeometryRequest'] = BBoxGeometryRequest class ROIRequest(ModelNormal): @@ -59,11 +59,12 @@ class ROIRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("label",): { - "min_length": 1, + ('label',): { + 'min_length': 1, }, } @@ -74,17 +75,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -100,20 +91,22 @@ def openapi_types(): """ lazy_import() return { - "label": (str,), # noqa: E501 - "geometry": (BBoxGeometryRequest,), # noqa: E501 + 'label': (str,), # noqa: E501 + 'geometry': (BBoxGeometryRequest,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "label": "label", # noqa: E501 - "geometry": "geometry", # noqa: E501 + 'label': 'label', # noqa: E501 + 'geometry': 'geometry', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -159,18 +152,17 @@ def _from_openapi_data(cls, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -188,24 +180,22 @@ def _from_openapi_data(cls, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -249,16 +239,15 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -276,17 +265,13 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/rule.py b/generated/groundlight_openapi_client/model/rule.py index 7f1be14a..66991d0c 100644 --- a/generated/groundlight_openapi_client/model/rule.py +++ b/generated/groundlight_openapi_client/model/rule.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -35,12 +36,11 @@ def lazy_import(): from groundlight_openapi_client.model.condition import Condition from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum from groundlight_openapi_client.model.webhook_action import WebhookAction - - globals()["Action"] = Action - globals()["ActionList"] = ActionList - globals()["Condition"] = Condition - globals()["SnoozeTimeUnitEnum"] = SnoozeTimeUnitEnum - globals()["WebhookAction"] = WebhookAction + globals()['Action'] = Action + globals()['ActionList'] = ActionList + globals()['Condition'] = Condition + globals()['SnoozeTimeUnitEnum'] = SnoozeTimeUnitEnum + globals()['WebhookAction'] = WebhookAction class Rule(ModelNormal): @@ -67,14 +67,15 @@ class Rule(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 44, + ('name',): { + 'max_length': 44, }, - ("snooze_time_value",): { - "inclusive_minimum": 0, + ('snooze_time_value',): { + 'inclusive_minimum': 0, }, } @@ -85,17 +86,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -111,63 +102,44 @@ def openapi_types(): """ lazy_import() return { - "id": (int,), # noqa: E501 - "detector_id": (str,), # noqa: E501 - "detector_name": (str,), # noqa: E501 - "name": (str,), # noqa: E501 - "condition": (Condition,), # noqa: E501 - "enabled": (bool,), # noqa: E501 - "snooze_time_enabled": (bool,), # noqa: E501 - "snooze_time_value": (int,), # noqa: E501 - "snooze_time_unit": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "human_review_required": (bool,), # noqa: E501 - "action": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "webhook_action": ([WebhookAction],), # noqa: E501 + 'id': (int,), # noqa: E501 + 'detector_id': (str,), # noqa: E501 + 'detector_name': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'condition': (Condition,), # noqa: E501 + 'enabled': (bool,), # noqa: E501 + 'snooze_time_enabled': (bool,), # noqa: E501 + 'snooze_time_value': (int,), # noqa: E501 + 'snooze_time_unit': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'human_review_required': (bool,), # noqa: E501 + 'action': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'webhook_action': ([WebhookAction],), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "detector_id": "detector_id", # noqa: E501 - "detector_name": "detector_name", # noqa: E501 - "name": "name", # noqa: E501 - "condition": "condition", # noqa: E501 - "enabled": "enabled", # noqa: E501 - "snooze_time_enabled": "snooze_time_enabled", # noqa: E501 - "snooze_time_value": "snooze_time_value", # noqa: E501 - "snooze_time_unit": "snooze_time_unit", # noqa: E501 - "human_review_required": "human_review_required", # noqa: E501 - "action": "action", # noqa: E501 - "webhook_action": "webhook_action", # noqa: E501 + 'id': 'id', # noqa: E501 + 'detector_id': 'detector_id', # noqa: E501 + 'detector_name': 'detector_name', # noqa: E501 + 'name': 'name', # noqa: E501 + 'condition': 'condition', # noqa: E501 + 'enabled': 'enabled', # noqa: E501 + 'snooze_time_enabled': 'snooze_time_enabled', # noqa: E501 + 'snooze_time_value': 'snooze_time_value', # noqa: E501 + 'snooze_time_unit': 'snooze_time_unit', # noqa: E501 + 'human_review_required': 'human_review_required', # noqa: E501 + 'action': 'action', # noqa: E501 + 'webhook_action': 'webhook_action', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 - "detector_id", # noqa: E501 - "detector_name", # noqa: E501 + 'id', # noqa: E501 + 'detector_id', # noqa: E501 + 'detector_name', # noqa: E501 } _composed_schemas = {} @@ -224,18 +196,17 @@ def _from_openapi_data(cls, id, detector_id, detector_name, name, condition, *ar webhook_action ([WebhookAction]): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -256,24 +227,22 @@ def _from_openapi_data(cls, id, detector_id, detector_name, name, condition, *ar self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -323,16 +292,15 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookAction]): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -350,17 +318,13 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/rule_request.py b/generated/groundlight_openapi_client/model/rule_request.py index 8fdf8fe1..0bf2e262 100644 --- a/generated/groundlight_openapi_client/model/rule_request.py +++ b/generated/groundlight_openapi_client/model/rule_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,7 +25,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -35,12 +36,11 @@ def lazy_import(): from groundlight_openapi_client.model.condition_request import ConditionRequest from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum from groundlight_openapi_client.model.webhook_action_request import WebhookActionRequest - - globals()["Action"] = Action - globals()["ActionList"] = ActionList - globals()["ConditionRequest"] = ConditionRequest - globals()["SnoozeTimeUnitEnum"] = SnoozeTimeUnitEnum - globals()["WebhookActionRequest"] = WebhookActionRequest + globals()['Action'] = Action + globals()['ActionList'] = ActionList + globals()['ConditionRequest'] = ConditionRequest + globals()['SnoozeTimeUnitEnum'] = SnoozeTimeUnitEnum + globals()['WebhookActionRequest'] = WebhookActionRequest class RuleRequest(ModelNormal): @@ -67,15 +67,16 @@ class RuleRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 44, - "min_length": 1, + ('name',): { + 'max_length': 44, + 'min_length': 1, }, - ("snooze_time_value",): { - "inclusive_minimum": 0, + ('snooze_time_value',): { + 'inclusive_minimum': 0, }, } @@ -86,17 +87,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -112,54 +103,36 @@ def openapi_types(): """ lazy_import() return { - "name": (str,), # noqa: E501 - "condition": (ConditionRequest,), # noqa: E501 - "enabled": (bool,), # noqa: E501 - "snooze_time_enabled": (bool,), # noqa: E501 - "snooze_time_value": (int,), # noqa: E501 - "snooze_time_unit": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "human_review_required": (bool,), # noqa: E501 - "action": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "webhook_action": ([WebhookActionRequest],), # noqa: E501 + 'name': (str,), # noqa: E501 + 'condition': (ConditionRequest,), # noqa: E501 + 'enabled': (bool,), # noqa: E501 + 'snooze_time_enabled': (bool,), # noqa: E501 + 'snooze_time_value': (int,), # noqa: E501 + 'snooze_time_unit': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'human_review_required': (bool,), # noqa: E501 + 'action': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'webhook_action': ([WebhookActionRequest],), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "condition": "condition", # noqa: E501 - "enabled": "enabled", # noqa: E501 - "snooze_time_enabled": "snooze_time_enabled", # noqa: E501 - "snooze_time_value": "snooze_time_value", # noqa: E501 - "snooze_time_unit": "snooze_time_unit", # noqa: E501 - "human_review_required": "human_review_required", # noqa: E501 - "action": "action", # noqa: E501 - "webhook_action": "webhook_action", # noqa: E501 + 'name': 'name', # noqa: E501 + 'condition': 'condition', # noqa: E501 + 'enabled': 'enabled', # noqa: E501 + 'snooze_time_enabled': 'snooze_time_enabled', # noqa: E501 + 'snooze_time_value': 'snooze_time_value', # noqa: E501 + 'snooze_time_unit': 'snooze_time_unit', # noqa: E501 + 'human_review_required': 'human_review_required', # noqa: E501 + 'action': 'action', # noqa: E501 + 'webhook_action': 'webhook_action', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -212,18 +185,17 @@ def _from_openapi_data(cls, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookActionRequest]): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -241,24 +213,22 @@ def _from_openapi_data(cls, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -309,16 +279,15 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookActionRequest]): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -336,17 +305,13 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py b/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py index f5586bb6..672227fc 100644 --- a/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py +++ b/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class SnoozeTimeUnitEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,15 +52,16 @@ class SnoozeTimeUnitEnum(ModelSimple): """ allowed_values = { - ("value",): { - "DAYS": "DAYS", - "HOURS": "HOURS", - "MINUTES": "MINUTES", - "SECONDS": "SECONDS", + ('value',): { + 'DAYS': "DAYS", + 'HOURS': "HOURS", + 'MINUTES': "MINUTES", + 'SECONDS': "SECONDS", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -75,13 +78,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -89,12 +93,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -140,10 +144,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -154,15 +158,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -179,8 +182,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -232,12 +234,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -248,15 +250,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -273,8 +274,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/source.py b/generated/groundlight_openapi_client/model/source.py index b9c247c4..44d234b9 100644 --- a/generated/groundlight_openapi_client/model/source.py +++ b/generated/groundlight_openapi_client/model/source.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class Source(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,20 +52,21 @@ class Source(ModelSimple): """ allowed_values = { - ("value",): { - "STILL_PROCESSING": "STILL_PROCESSING", - "CLOUD": "CLOUD", - "USER": "USER", - "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", - "ALGORITHM": "ALGORITHM", - "AI_CLOUD": "AI_CLOUD", - "AI_CLOUD_ENSEMBLE": "AI_CLOUD_ENSEMBLE", - "HUMAN_AI_CLOUD_ENSEMBLE": "HUMAN_AI_CLOUD_ENSEMBLE", - "EDGE": "EDGE", + ('value',): { + 'STILL_PROCESSING': "STILL_PROCESSING", + 'CLOUD': "CLOUD", + 'USER': "USER", + 'CLOUD_ENSEMBLE': "CLOUD_ENSEMBLE", + 'ALGORITHM': "ALGORITHM", + 'AI_CLOUD': "AI_CLOUD", + 'AI_CLOUD_ENSEMBLE': "AI_CLOUD_ENSEMBLE", + 'HUMAN_AI_CLOUD_ENSEMBLE': "HUMAN_AI_CLOUD_ENSEMBLE", + 'EDGE': "EDGE", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -80,13 +83,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -94,12 +98,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -145,10 +149,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -159,15 +163,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -184,8 +187,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -237,12 +239,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -253,15 +255,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -278,8 +279,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/source_enum.py b/generated/groundlight_openapi_client/model/source_enum.py index e8e5a047..ca4db25f 100644 --- a/generated/groundlight_openapi_client/model/source_enum.py +++ b/generated/groundlight_openapi_client/model/source_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class SourceEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,22 +52,23 @@ class SourceEnum(ModelSimple): """ allowed_values = { - ("value",): { - "INITIAL_PLACEHOLDER": "INITIAL_PLACEHOLDER", - "CLOUD": "CLOUD", - "CUST": "CUST", - "HUMAN_CLOUD_ENSEMBLE": "HUMAN_CLOUD_ENSEMBLE", - "AI_CLOUD": "AI_CLOUD", - "AI_CLOUD_ENSEMBLE": "AI_CLOUD_ENSEMBLE", - "HUMAN_AI_CLOUD_ENSEMBLE": "HUMAN_AI_CLOUD_ENSEMBLE", - "ALG": "ALG", - "ALG_REC": "ALG_REC", - "ALG_UNCLEAR": "ALG_UNCLEAR", - "EDGE": "EDGE", + ('value',): { + 'INITIAL_PLACEHOLDER': "INITIAL_PLACEHOLDER", + 'CLOUD': "CLOUD", + 'CUST': "CUST", + 'HUMAN_CLOUD_ENSEMBLE': "HUMAN_CLOUD_ENSEMBLE", + 'AI_CLOUD': "AI_CLOUD", + 'AI_CLOUD_ENSEMBLE': "AI_CLOUD_ENSEMBLE", + 'HUMAN_AI_CLOUD_ENSEMBLE': "HUMAN_AI_CLOUD_ENSEMBLE", + 'ALG': "ALG", + 'ALG_REC': "ALG_REC", + 'ALG_UNCLEAR': "ALG_UNCLEAR", + 'EDGE': "EDGE", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -82,13 +85,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -96,12 +100,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -147,10 +151,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -161,15 +165,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -186,8 +189,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -239,12 +241,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -255,15 +257,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -280,8 +281,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/status_enum.py b/generated/groundlight_openapi_client/model/status_enum.py index b41c2871..d6a1f357 100644 --- a/generated/groundlight_openapi_client/model/status_enum.py +++ b/generated/groundlight_openapi_client/model/status_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class StatusEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,13 +52,14 @@ class StatusEnum(ModelSimple): """ allowed_values = { - ("value",): { - "ON": "ON", - "OFF": "OFF", + ('value',): { + 'ON': "ON", + 'OFF': "OFF", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -73,13 +76,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -87,12 +91,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -138,10 +142,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -152,15 +156,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -177,8 +180,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -230,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -246,15 +248,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -271,8 +272,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/text_mode_configuration.py b/generated/groundlight_openapi_client/model/text_mode_configuration.py index ee4c4e73..5a6990f0 100644 --- a/generated/groundlight_openapi_client/model/text_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/text_mode_configuration.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class TextModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,12 +55,13 @@ class TextModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("value_max_length",): { - "inclusive_maximum": 250, - "inclusive_minimum": 1, + ('value_max_length',): { + 'inclusive_maximum': 250, + 'inclusive_minimum': 1, }, } @@ -68,17 +71,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -93,18 +86,20 @@ def openapi_types(): and the value is attribute type. """ return { - "value_max_length": (int,), # noqa: E501 + 'value_max_length': (int,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "value_max_length": "value_max_length", # noqa: E501 + 'value_max_length': 'value_max_length', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -147,18 +142,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 value_max_length (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -174,24 +168,22 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -232,16 +224,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 value_max_length (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -257,17 +248,13 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/text_recognition_result.py b/generated/groundlight_openapi_client/model/text_recognition_result.py index 0e769567..97b87183 100644 --- a/generated/groundlight_openapi_client/model/text_recognition_result.py +++ b/generated/groundlight_openapi_client/model/text_recognition_result.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class TextRecognitionResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -54,15 +56,15 @@ class TextRecognitionResult(ModelNormal): """ allowed_values = { - ("result_type",): { - "TEXT_RECOGNITION": "text_recognition", + ('result_type',): { + 'TEXT_RECOGNITION': "text_recognition", }, } validations = { - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -72,17 +74,7 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -97,34 +89,30 @@ def openapi_types(): and the value is attribute type. """ return { - "text": ( - str, - none_type, - ), # noqa: E501 - "truncated": (bool,), # noqa: E501 - "confidence": ( - float, - none_type, - ), # noqa: E501 - "source": (str,), # noqa: E501 - "result_type": (str,), # noqa: E501 - "from_edge": (bool,), # noqa: E501 + 'text': (str, none_type,), # noqa: E501 + 'truncated': (bool,), # noqa: E501 + 'confidence': (float, none_type,), # noqa: E501 + 'source': (str,), # noqa: E501 + 'result_type': (str,), # noqa: E501 + 'from_edge': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "text": "text", # noqa: E501 - "truncated": "truncated", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "source": "source", # noqa: E501 - "result_type": "result_type", # noqa: E501 - "from_edge": "from_edge", # noqa: E501 + 'text': 'text', # noqa: E501 + 'truncated': 'truncated', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'source': 'source', # noqa: E501 + 'result_type': 'result_type', # noqa: E501 + 'from_edge': 'from_edge', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -174,18 +162,17 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -203,24 +190,22 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 self.text = text self.truncated = truncated for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -268,16 +253,15 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -295,17 +279,13 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 self.text = text self.truncated = truncated for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/verb_enum.py b/generated/groundlight_openapi_client/model/verb_enum.py index 789dd77c..3b2acb15 100644 --- a/generated/groundlight_openapi_client/model/verb_enum.py +++ b/generated/groundlight_openapi_client/model/verb_enum.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,11 +25,12 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError + class VerbEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,16 +52,17 @@ class VerbEnum(ModelSimple): """ allowed_values = { - ("value",): { - "ANSWERED_CONSECUTIVELY": "ANSWERED_CONSECUTIVELY", - "ANSWERED_WITHIN_TIME": "ANSWERED_WITHIN_TIME", - "CHANGED_TO": "CHANGED_TO", - "NO_CHANGE": "NO_CHANGE", - "NO_QUERIES": "NO_QUERIES", + ('value',): { + 'ANSWERED_CONSECUTIVELY': "ANSWERED_CONSECUTIVELY", + 'ANSWERED_WITHIN_TIME': "ANSWERED_WITHIN_TIME", + 'CHANGED_TO': "CHANGED_TO", + 'NO_CHANGE': "NO_CHANGE", + 'NO_QUERIES': "NO_QUERIES", }, } - validations = {} + validations = { + } additional_properties_type = None @@ -76,13 +79,14 @@ def openapi_types(): and the value is attribute type. """ return { - "value": (str,), + 'value': (str,), } @cached_property def discriminator(): return None + attribute_map = {} read_only_vars = set() @@ -90,12 +94,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -141,10 +145,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -155,15 +159,14 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -180,8 +183,7 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), @@ -233,12 +235,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop("_path_to_item", ()) + _path_to_item = kwargs.pop('_path_to_item', ()) self = super(OpenApiModel, cls).__new__(cls) - if "value" in kwargs: - value = kwargs.pop("value") + if 'value' in kwargs: + value = kwargs.pop('value') elif args: args = list(args) value = args.pop(0) @@ -249,15 +251,14 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -274,8 +275,7 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." - % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/webhook_action.py b/generated/groundlight_openapi_client/model/webhook_action.py index 33f70f3c..b230804e 100644 --- a/generated/groundlight_openapi_client/model/webhook_action.py +++ b/generated/groundlight_openapi_client/model/webhook_action.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.payload_template import PayloadTemplate - - globals()["PayloadTemplate"] = PayloadTemplate + globals()['PayloadTemplate'] = PayloadTemplate class WebhookAction(ModelNormal): @@ -59,11 +59,12 @@ class WebhookAction(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("url",): { - "max_length": 200, + ('url',): { + 'max_length': 200, }, } @@ -74,17 +75,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -100,44 +91,30 @@ def openapi_types(): """ lazy_import() return { - "url": (str,), # noqa: E501 - "include_image": (bool,), # noqa: E501 - "payload_template": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "last_message_failed": (bool,), # noqa: E501 - "last_failure_error": ( - str, - none_type, - ), # noqa: E501 - "last_failed_at": ( - datetime, - none_type, - ), # noqa: E501 + 'url': (str,), # noqa: E501 + 'include_image': (bool,), # noqa: E501 + 'payload_template': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'last_message_failed': (bool,), # noqa: E501 + 'last_failure_error': (str, none_type,), # noqa: E501 + 'last_failed_at': (datetime, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "url": "url", # noqa: E501 - "include_image": "include_image", # noqa: E501 - "payload_template": "payload_template", # noqa: E501 - "last_message_failed": "last_message_failed", # noqa: E501 - "last_failure_error": "last_failure_error", # noqa: E501 - "last_failed_at": "last_failed_at", # noqa: E501 + 'url': 'url', # noqa: E501 + 'include_image': 'include_image', # noqa: E501 + 'payload_template': 'payload_template', # noqa: E501 + 'last_message_failed': 'last_message_failed', # noqa: E501 + 'last_failure_error': 'last_failure_error', # noqa: E501 + 'last_failed_at': 'last_failed_at', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -187,18 +164,17 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -215,24 +191,22 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -280,16 +254,15 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -306,17 +279,13 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model/webhook_action_request.py b/generated/groundlight_openapi_client/model/webhook_action_request.py index cd98a99b..39ba2c85 100644 --- a/generated/groundlight_openapi_client/model/webhook_action_request.py +++ b/generated/groundlight_openapi_client/model/webhook_action_request.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,15 +25,14 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.payload_template_request import PayloadTemplateRequest - - globals()["PayloadTemplateRequest"] = PayloadTemplateRequest + globals()['PayloadTemplateRequest'] = PayloadTemplateRequest class WebhookActionRequest(ModelNormal): @@ -59,12 +59,13 @@ class WebhookActionRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("url",): { - "max_length": 200, - "min_length": 1, + ('url',): { + 'max_length': 200, + 'min_length': 1, }, } @@ -75,17 +76,7 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ) # noqa: E501 + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -101,44 +92,30 @@ def openapi_types(): """ lazy_import() return { - "url": (str,), # noqa: E501 - "include_image": (bool,), # noqa: E501 - "payload_template": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "last_message_failed": (bool,), # noqa: E501 - "last_failure_error": ( - str, - none_type, - ), # noqa: E501 - "last_failed_at": ( - datetime, - none_type, - ), # noqa: E501 + 'url': (str,), # noqa: E501 + 'include_image': (bool,), # noqa: E501 + 'payload_template': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'last_message_failed': (bool,), # noqa: E501 + 'last_failure_error': (str, none_type,), # noqa: E501 + 'last_failed_at': (datetime, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "url": "url", # noqa: E501 - "include_image": "include_image", # noqa: E501 - "payload_template": "payload_template", # noqa: E501 - "last_message_failed": "last_message_failed", # noqa: E501 - "last_failure_error": "last_failure_error", # noqa: E501 - "last_failed_at": "last_failed_at", # noqa: E501 + 'url': 'url', # noqa: E501 + 'include_image': 'include_image', # noqa: E501 + 'payload_template': 'payload_template', # noqa: E501 + 'last_message_failed': 'last_message_failed', # noqa: E501 + 'last_failure_error': 'last_failure_error', # noqa: E501 + 'last_failed_at': 'last_failed_at', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -188,18 +165,17 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -216,24 +192,22 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - "_data_store", - "_check_type", - "_spec_property_naming", - "_path_to_item", - "_configuration", - "_visited_composed_classes", + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', ]) @convert_js_args_to_python_args @@ -281,16 +255,15 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop("_check_type", True) - _spec_property_naming = kwargs.pop("_spec_property_naming", False) - _path_to_item = kwargs.pop("_path_to_item", ()) - _configuration = kwargs.pop("_configuration", None) - _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." - % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args, self.__class__.__name__, ), @@ -307,17 +280,13 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if ( - var_name not in self.attribute_map - and self._configuration is not None - and self._configuration.discard_unknown_keys - and self.additional_properties_type is None - ): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError( - f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - "class with read only attributes." - ) + raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + f"class with read only attributes.") diff --git a/generated/groundlight_openapi_client/model_utils.py b/generated/groundlight_openapi_client/model_utils.py index cf7bd6d4..a1c7d7a8 100644 --- a/generated/groundlight_openapi_client/model_utils.py +++ b/generated/groundlight_openapi_client/model_utils.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + from datetime import date, datetime # noqa: F401 from copy import deepcopy import inspect @@ -32,7 +33,6 @@ def convert_js_args_to_python_args(fn): from functools import wraps - @wraps(fn) def wrapped_init(_self, *args, **kwargs): """ @@ -40,11 +40,10 @@ def wrapped_init(_self, *args, **kwargs): parameter of a class method. During generation, `self` attributes are mapped to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. """ - spec_property_naming = kwargs.get("_spec_property_naming", False) + spec_property_naming = kwargs.get('_spec_property_naming', False) if spec_property_naming: kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) return fn(_self, *args, **kwargs) - return wrapped_init @@ -52,7 +51,7 @@ class cached_property(object): # this caches the result of the function call for fn with no inputs # use this as a decorator on function methods that you want converted # into cached properties - result_key = "_results" + result_key = '_results' def __init__(self, fn): self._fn = fn @@ -68,7 +67,6 @@ def __get__(self, instance, cls=None): PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - def allows_single_value_input(cls): """ This function returns True if the input composed schema model or any @@ -82,15 +80,17 @@ def allows_single_value_input(cls): - null TODO: lru_cache this """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: + if ( + issubclass(cls, ModelSimple) or + cls in PRIMITIVE_TYPES + ): return True elif issubclass(cls, ModelComposed): - if not cls._composed_schemas["oneOf"]: + if not cls._composed_schemas['oneOf']: return False - return any(allows_single_value_input(c) for c in cls._composed_schemas["oneOf"]) + return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) return False - def composed_model_input_classes(cls): """ This function returns a list of the possible models that can be accepted as @@ -105,11 +105,11 @@ def composed_model_input_classes(cls): else: return get_discriminated_classes(cls) elif issubclass(cls, ModelComposed): - if not cls._composed_schemas["oneOf"]: + if not cls._composed_schemas['oneOf']: return [] if cls.discriminator is None: input_classes = [] - for c in cls._composed_schemas["oneOf"]: + for c in cls._composed_schemas['oneOf']: input_classes.extend(composed_model_input_classes(c)) return input_classes else: @@ -131,28 +131,46 @@ def set_attribute(self, name, value): if name in self.openapi_types: required_types_mixed = self.openapi_types[name] elif self.additional_properties_type is None: - raise ApiAttributeError("{0} has no attribute '{1}'".format(type(self).__name__, name), path_to_item) + raise ApiAttributeError( + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + path_to_item + ) elif self.additional_properties_type is not None: required_types_mixed = self.additional_properties_type if get_simple_class(name) != str: - error_msg = type_error_message(var_name=name, var_value=name, valid_classes=(str,), key_type=True) - raise ApiTypeError(error_msg, path_to_item=path_to_item, valid_classes=(str,), key_type=True) + error_msg = type_error_message( + var_name=name, + var_value=name, + valid_classes=(str,), + key_type=True + ) + raise ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=(str,), + key_type=True + ) if self._check_type: value = validate_and_convert_types( - value, - required_types_mixed, - path_to_item, - self._spec_property_naming, - self._check_type, - configuration=self._configuration, - ) + value, required_types_mixed, path_to_item, self._spec_property_naming, + self._check_type, configuration=self._configuration) if (name,) in self.allowed_values: - check_allowed_values(self.allowed_values, (name,), value) + check_allowed_values( + self.allowed_values, + (name,), + value + ) if (name,) in self.validations: - check_validations(self.validations, (name,), value, self._configuration) - self.__dict__["_data_store"][name] = value + check_validations( + self.validations, + (name,), + value, + self._configuration + ) + self.__dict__['_data_store'][name] = value def __repr__(self): """For `print` and `pprint`""" @@ -189,6 +207,7 @@ def __deepcopy__(self, memo): setattr(new_inst, k, deepcopy(v, memo)) return new_inst + def __new__(cls, *args, **kwargs): # this function uses the discriminator to # pick a new schema/class to instantiate because a discriminator @@ -205,8 +224,12 @@ def __new__(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - visited_composed_classes = kwargs.get("_visited_composed_classes", ()) - if cls.discriminator is None or cls in visited_composed_classes: + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -236,24 +259,28 @@ def __new__(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get("_path_to_item", ()) + path_to_item = kwargs.get('_path_to_item', ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get("_path_to_item", ()) - disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -278,11 +305,13 @@ def __new__(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = cls._composed_schemas.get("oneOf", ()) + cls._composed_schemas.get("anyOf", ()) + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - if cls._composed_schemas.get("allOf") and oneof_anyof_child: + if cls._composed_schemas.get('allOf') and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = super(OpenApiModel, cls).__new__(cls) @@ -297,6 +326,7 @@ def __new__(cls, *args, **kwargs): return new_inst + @classmethod @convert_js_args_to_python_args def _new_from_openapi_data(cls, *args, **kwargs): @@ -315,8 +345,12 @@ def _new_from_openapi_data(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - visited_composed_classes = kwargs.get("_visited_composed_classes", ()) - if cls.discriminator is None or cls in visited_composed_classes: + + visited_composed_classes = kwargs.get('_visited_composed_classes', ()) + if ( + cls.discriminator is None or + cls in visited_composed_classes + ): # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -346,24 +380,28 @@ def _new_from_openapi_data(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get("_path_to_item", ()) + path_to_item = kwargs.get('_path_to_item', ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" % + (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class( + cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get("_path_to_item", ()) - disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get('_path_to_item', ()) + disc_prop_value = kwargs.get( + discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" % + (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -388,15 +426,18 @@ def _new_from_openapi_data(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = cls._composed_schemas.get("oneOf", ()) + cls._composed_schemas.get("anyOf", ()) + oneof_anyof_classes = ( + cls._composed_schemas.get('oneOf', ()) + + cls._composed_schemas.get('anyOf', ())) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) + kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - if cls._composed_schemas.get("allOf") and oneof_anyof_child: + if cls._composed_schemas.get('allOf') and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = cls._from_openapi_data(*args, **kwargs) + new_inst = new_cls._new_from_openapi_data(*args, **kwargs) return new_inst @@ -418,7 +459,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__["_data_store"].get(name, default) + return self.__dict__['_data_store'].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -426,7 +467,9 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format(type(self).__name__, name), [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] ) def __contains__(self, name): @@ -434,7 +477,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__["_data_store"] + return name in self.__dict__['_data_store'] def to_str(self): """Returns the string representation of the model""" @@ -445,8 +488,8 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - this_val = self._data_store["value"] - that_val = other._data_store["value"] + this_val = self._data_store['value'] + that_val = other._data_store['value'] types = set() types.add(this_val.__class__) types.add(that_val.__class__) @@ -471,7 +514,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__["_data_store"].get(name, default) + return self.__dict__['_data_store'].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -479,7 +522,9 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format(type(self).__name__, name), [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] ) def __contains__(self, name): @@ -487,7 +532,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__["_data_store"] + return name in self.__dict__['_data_store'] def to_dict(self): """Returns the model properties as a dict""" @@ -572,8 +617,9 @@ def __setitem__(self, name, value): """ if name not in self.openapi_types: raise ApiAttributeError( - "{0} has no attribute '{1}'".format(type(self).__name__, name), - [e for e in [self._path_to_item, name] if e], + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] ) # attribute must be set on self and composed instances self.set_attribute(name, value) @@ -581,7 +627,7 @@ def __setitem__(self, name, value): setattr(model_instance, name, value) if name not in self._var_name_to_model_instances: # we assigned an additional property - self.__dict__["_var_name_to_model_instances"][name] = self._composed_instances + [self] + self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] return None __unset_attribute_value__ = object() @@ -614,7 +660,7 @@ def get(self, name, default=None): "Values stored for property {0} in {1} differ when looking " "at self and self's composed instances. All values must be " "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e], + [e for e in [self._path_to_item, name] if e] ) def __getitem__(self, name): @@ -622,8 +668,9 @@ def __getitem__(self, name): value = self.get(name, self.__unset_attribute_value__) if value is self.__unset_attribute_value__: raise ApiAttributeError( - "{0} has no attribute '{1}'".format(type(self).__name__, name), - [e for e in [self._path_to_item, name] if e], + "{0} has no attribute '{1}'".format( + type(self).__name__, name), + [e for e in [self._path_to_item, name] if e] ) return value @@ -633,7 +680,8 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - model_instances = self._var_name_to_model_instances.get(name, self._additional_properties_model_instances) + model_instances = self._var_name_to_model_instances.get( + name, self._additional_properties_model_instances) if model_instances: for model_instance in model_instances: @@ -672,7 +720,7 @@ def __eq__(self, other): ModelComposed: 0, ModelNormal: 1, ModelSimple: 2, - none_type: 3, # The type of 'None'. + none_type: 3, # The type of 'None'. list: 4, dict: 5, float: 6, @@ -681,7 +729,7 @@ def __eq__(self, other): datetime: 9, date: 10, str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. } # these are used to limit what type conversions we try to do @@ -690,7 +738,7 @@ def __eq__(self, other): UPCONVERSION_TYPE_PAIRS = ( (str, datetime), (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. (list, ModelComposed), (dict, ModelComposed), (str, ModelComposed), @@ -737,7 +785,7 @@ def __eq__(self, other): (str, date), # (int, str), # (float, str), - (str, file_type), + (str, file_type) ), } @@ -794,22 +842,41 @@ def check_allowed_values(allowed_values, input_variable_path, input_values): are checking to see if they are in allowed_values """ these_allowed_values = list(allowed_values[input_variable_path].values()) - if isinstance(input_values, list) and not set(input_values).issubset(set(these_allowed_values)): - invalid_values = (", ".join(map(str, set(input_values) - set(these_allowed_values))),) + if (isinstance(input_values, list) + and not set(input_values).issubset( + set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values) - set(these_allowed_values))), raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" - % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) + "Invalid values for `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) ) - elif isinstance(input_values, dict) and not set(input_values.keys()).issubset(set(these_allowed_values)): - invalid_values = ", ".join(map(str, set(input_values.keys()) - set(these_allowed_values))) + elif (isinstance(input_values, dict) + and not set( + input_values.keys()).issubset(set(these_allowed_values))): + invalid_values = ", ".join( + map(str, set(input_values.keys()) - set(these_allowed_values))) raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" - % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) + "Invalid keys in `%s` [%s], must be a subset of [%s]" % + ( + input_variable_path[0], + invalid_values, + ", ".join(map(str, these_allowed_values)) + ) ) - elif not isinstance(input_values, (list, dict)) and input_values not in these_allowed_values: + elif (not isinstance(input_values, (list, dict)) + and input_values not in these_allowed_values): raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" - % (input_variable_path[0], input_values, these_allowed_values) + "Invalid value for `%s` (%s), must be one of %s" % + ( + input_variable_path[0], + input_values, + these_allowed_values + ) ) @@ -823,14 +890,14 @@ def is_json_validation_enabled(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return ( - configuration is None - or not hasattr(configuration, "_disabled_client_side_validations") - or schema_keyword not in configuration._disabled_client_side_validations - ) + return (configuration is None or + not hasattr(configuration, '_disabled_client_side_validations') or + schema_keyword not in configuration._disabled_client_side_validations) -def check_validations(validations, input_variable_path, input_values, configuration=None): +def check_validations( + validations, input_variable_path, input_values, + configuration=None): """Raises an exception if the input_values are invalid Args: @@ -845,60 +912,66 @@ def check_validations(validations, input_variable_path, input_values, configurat return current_validations = validations[input_variable_path] - if ( - is_json_validation_enabled("multipleOf", configuration) - and "multiple_of" in current_validations - and isinstance(input_values, (int, float)) - and not (float(input_values) / current_validations["multiple_of"]).is_integer() - ): + if (is_json_validation_enabled('multipleOf', configuration) and + 'multiple_of' in current_validations and + isinstance(input_values, (int, float)) and + not (float(input_values) / current_validations['multiple_of']).is_integer()): # Note 'multipleOf' will be as good as the floating point arithmetic. raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of `%s`" - % (input_variable_path[0], current_validations["multiple_of"]) + "Invalid value for `%s`, value must be a multiple of " + "`%s`" % ( + input_variable_path[0], + current_validations['multiple_of'] + ) ) - if ( - is_json_validation_enabled("maxLength", configuration) - and "max_length" in current_validations - and len(input_values) > current_validations["max_length"] - ): + if (is_json_validation_enabled('maxLength', configuration) and + 'max_length' in current_validations and + len(input_values) > current_validations['max_length']): raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to `%s`" - % (input_variable_path[0], current_validations["max_length"]) + "Invalid value for `%s`, length must be less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['max_length'] + ) ) - if ( - is_json_validation_enabled("minLength", configuration) - and "min_length" in current_validations - and len(input_values) < current_validations["min_length"] - ): + if (is_json_validation_enabled('minLength', configuration) and + 'min_length' in current_validations and + len(input_values) < current_validations['min_length']): raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to `%s`" - % (input_variable_path[0], current_validations["min_length"]) + "Invalid value for `%s`, length must be greater than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['min_length'] + ) ) - if ( - is_json_validation_enabled("maxItems", configuration) - and "max_items" in current_validations - and len(input_values) > current_validations["max_items"] - ): + if (is_json_validation_enabled('maxItems', configuration) and + 'max_items' in current_validations and + len(input_values) > current_validations['max_items']): raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or equal to `%s`" - % (input_variable_path[0], current_validations["max_items"]) + "Invalid value for `%s`, number of items must be less than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['max_items'] + ) ) - if ( - is_json_validation_enabled("minItems", configuration) - and "min_items" in current_validations - and len(input_values) < current_validations["min_items"] - ): + if (is_json_validation_enabled('minItems', configuration) and + 'min_items' in current_validations and + len(input_values) < current_validations['min_items']): raise ValueError( - "Invalid value for `%s`, number of items must be greater than or equal to `%s`" - % (input_variable_path[0], current_validations["min_items"]) + "Invalid value for `%s`, number of items must be greater than or " + "equal to `%s`" % ( + input_variable_path[0], + current_validations['min_items'] + ) ) - items = ("exclusive_maximum", "inclusive_maximum", "exclusive_minimum", "inclusive_minimum") - if any(item in current_validations for item in items): + items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', + 'inclusive_minimum') + if (any(item in current_validations for item in items)): if isinstance(input_values, list): max_val = max(input_values) min_val = min(input_values) @@ -909,55 +982,57 @@ def check_validations(validations, input_variable_path, input_values, configurat max_val = input_values min_val = input_values - if ( - is_json_validation_enabled("exclusiveMaximum", configuration) - and "exclusive_maximum" in current_validations - and max_val >= current_validations["exclusive_maximum"] - ): + if (is_json_validation_enabled('exclusiveMaximum', configuration) and + 'exclusive_maximum' in current_validations and + max_val >= current_validations['exclusive_maximum']): raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" - % (input_variable_path[0], current_validations["exclusive_maximum"]) + "Invalid value for `%s`, must be a value less than `%s`" % ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) ) - if ( - is_json_validation_enabled("maximum", configuration) - and "inclusive_maximum" in current_validations - and max_val > current_validations["inclusive_maximum"] - ): + if (is_json_validation_enabled('maximum', configuration) and + 'inclusive_maximum' in current_validations and + max_val > current_validations['inclusive_maximum']): raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to `%s`" - % (input_variable_path[0], current_validations["inclusive_maximum"]) + "Invalid value for `%s`, must be a value less than or equal to " + "`%s`" % ( + input_variable_path[0], + current_validations['inclusive_maximum'] + ) ) - if ( - is_json_validation_enabled("exclusiveMinimum", configuration) - and "exclusive_minimum" in current_validations - and min_val <= current_validations["exclusive_minimum"] - ): + if (is_json_validation_enabled('exclusiveMinimum', configuration) and + 'exclusive_minimum' in current_validations and + min_val <= current_validations['exclusive_minimum']): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" - % (input_variable_path[0], current_validations["exclusive_maximum"]) + "Invalid value for `%s`, must be a value greater than `%s`" % + ( + input_variable_path[0], + current_validations['exclusive_maximum'] + ) ) - if ( - is_json_validation_enabled("minimum", configuration) - and "inclusive_minimum" in current_validations - and min_val < current_validations["inclusive_minimum"] - ): + if (is_json_validation_enabled('minimum', configuration) and + 'inclusive_minimum' in current_validations and + min_val < current_validations['inclusive_minimum']): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal to `%s`" - % (input_variable_path[0], current_validations["inclusive_minimum"]) + "Invalid value for `%s`, must be a value greater than or equal " + "to `%s`" % ( + input_variable_path[0], + current_validations['inclusive_minimum'] + ) ) - flags = current_validations.get("regex", {}).get("flags", 0) - if ( - is_json_validation_enabled("pattern", configuration) - and "regex" in current_validations - and not re.search(current_validations["regex"]["pattern"], input_values, flags=flags) - ): + flags = current_validations.get('regex', {}).get('flags', 0) + if (is_json_validation_enabled('pattern', configuration) and + 'regex' in current_validations and + not re.search(current_validations['regex']['pattern'], + input_values, flags=flags)): err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations["regex"]["pattern"], - ) + input_variable_path[0], + current_validations['regex']['pattern'] + ) if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. @@ -982,21 +1057,28 @@ def index_getter(class_or_instance): return COERCION_INDEX_BY_TYPE[list] elif isinstance(class_or_instance, dict): return COERCION_INDEX_BY_TYPE[dict] - elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelComposed): + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelComposed)): return COERCION_INDEX_BY_TYPE[ModelComposed] - elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelNormal): + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelNormal)): return COERCION_INDEX_BY_TYPE[ModelNormal] - elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelSimple): + elif (inspect.isclass(class_or_instance) + and issubclass(class_or_instance, ModelSimple)): return COERCION_INDEX_BY_TYPE[ModelSimple] elif class_or_instance in COERCION_INDEX_BY_TYPE: return COERCION_INDEX_BY_TYPE[class_or_instance] raise ApiValueError("Unsupported type: %s" % class_or_instance) - sorted_types = sorted(required_types, key=lambda class_or_instance: index_getter(class_or_instance)) + sorted_types = sorted( + required_types, + key=lambda class_or_instance: index_getter(class_or_instance) + ) return sorted_types -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, must_convert=True): +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, + must_convert=True): """Only keeps the type conversions that are possible Args: @@ -1041,7 +1123,6 @@ def remove_uncoercible(required_types_classes, current_item, spec_property_namin results_classes.append(required_type_class) return results_classes - def get_discriminated_classes(cls): """ Returns all the classes that a discriminator converts to @@ -1052,7 +1133,7 @@ def get_discriminated_classes(cls): if is_type_nullable(cls): possible_classes.append(cls) for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, "discriminator") and discr_cls.discriminator is not None: + if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: possible_classes.extend(get_discriminated_classes(discr_cls)) else: possible_classes.append(discr_cls) @@ -1064,7 +1145,7 @@ def get_possible_classes(cls, from_server_context): possible_classes = [cls] if from_server_context: return possible_classes - if hasattr(cls, "discriminator") and cls.discriminator is not None: + if hasattr(cls, 'discriminator') and cls.discriminator is not None: possible_classes = [] possible_classes.extend(get_discriminated_classes(cls)) elif issubclass(cls, ModelComposed): @@ -1120,10 +1201,11 @@ def change_keys_js_to_python(input_dict, model_class): document). """ - if getattr(model_class, "attribute_map", None) is None: + if getattr(model_class, 'attribute_map', None) is None: return input_dict output_dict = {} - reversed_attr_map = {value: key for key, value in model_class.attribute_map.items()} + reversed_attr_map = {value: key for key, value in + model_class.attribute_map.items()} for javascript_key, value in input_dict.items(): python_key = reversed_attr_map.get(javascript_key) if python_key is None: @@ -1136,9 +1218,17 @@ def change_keys_js_to_python(input_dict, model_class): def get_type_error(var_value, path_to_item, valid_classes, key_type=False): error_msg = type_error_message( - var_name=path_to_item[-1], var_value=var_value, valid_classes=valid_classes, key_type=key_type + var_name=path_to_item[-1], + var_value=var_value, + valid_classes=valid_classes, + key_type=key_type + ) + return ApiTypeError( + error_msg, + path_to_item=path_to_item, + valid_classes=valid_classes, + key_type=key_type ) - return ApiTypeError(error_msg, path_to_item=path_to_item, valid_classes=valid_classes, key_type=key_type) def deserialize_primitive(data, klass, path_to_item): @@ -1163,11 +1253,11 @@ def deserialize_primitive(data, klass, path_to_item): # The string should be in iso8601 datetime format. parsed_datetime = parse(data) date_only = ( - parsed_datetime.hour == 0 - and parsed_datetime.minute == 0 - and parsed_datetime.second == 0 - and parsed_datetime.tzinfo is None - and 8 <= len(data) <= 10 + parsed_datetime.hour == 0 and + parsed_datetime.minute == 0 and + parsed_datetime.second == 0 and + parsed_datetime.tzinfo is None and + 8 <= len(data) <= 10 ) if date_only: raise ValueError("This is a date, not a datetime") @@ -1181,17 +1271,21 @@ def deserialize_primitive(data, klass, path_to_item): if isinstance(data, str) and klass == float: if str(converted_value) != data: # '7' -> 7.0 -> '7.0' != '7' - raise ValueError("This is not a float") + raise ValueError('This is not a float') return converted_value except (OverflowError, ValueError) as ex: # parse can raise OverflowError raise ApiValueError( - "{0}Failed to parse {1} as {2}".format(additional_message, repr(data), klass.__name__), - path_to_item=path_to_item, + "{0}Failed to parse {1} as {2}".format( + additional_message, repr(data), klass.__name__ + ), + path_to_item=path_to_item ) from ex -def get_discriminator_class(model_class, discr_name, discr_value, cls_visited): +def get_discriminator_class(model_class, + discr_name, + discr_value, cls_visited): """Returns the child class specified by the discriminator. Args: @@ -1227,21 +1321,22 @@ def get_discriminator_class(model_class, discr_name, discr_value, cls_visited): # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig # if we try to make BasquePig from mammal, we need to travel through # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get("oneOf", ()) + model_class._composed_schemas.get( - "anyOf", () - ) - ancestor_classes = model_class._composed_schemas.get("allOf", ()) + descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ + model_class._composed_schemas.get('anyOf', ()) + ancestor_classes = model_class._composed_schemas.get('allOf', ()) possible_classes = descendant_classes + ancestor_classes for cls in possible_classes: # Check if the schema has inherited discriminators. - if hasattr(cls, "discriminator") and cls.discriminator is not None: - used_model_class = get_discriminator_class(cls, discr_name, discr_value, cls_visited) + if hasattr(cls, 'discriminator') and cls.discriminator is not None: + used_model_class = get_discriminator_class( + cls, discr_name, discr_value, cls_visited) if used_model_class is not None: return used_model_class return used_model_class -def deserialize_model(model_data, model_class, path_to_item, check_type, configuration, spec_property_naming): +def deserialize_model(model_data, model_class, path_to_item, check_type, + configuration, spec_property_naming): """Deserializes model_data to model instance. Args: @@ -1265,12 +1360,10 @@ def deserialize_model(model_data, model_class, path_to_item, check_type, configu ApiKeyError """ - kw_args = dict( - _check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming, - ) + kw_args = dict(_check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming) if issubclass(model_class, ModelSimple): return model_class._new_from_openapi_data(model_data, **kw_args) @@ -1306,29 +1399,23 @@ def deserialize_file(response_data, configuration, content_disposition=None): os.remove(path) if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: if isinstance(response_data, str): # change str to bytes so we can write it - response_data = response_data.encode("utf-8") + response_data = response_data.encode('utf-8') f.write(response_data) f = open(path, "rb") return f -def attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=True, -): +def attempt_convert_item(input_value, valid_classes, path_to_item, + configuration, spec_property_naming, key_type=False, + must_convert=False, check_type=True): """ Args: input_value (any): the data to convert @@ -1353,21 +1440,24 @@ def attempt_convert_item( ApiKeyError """ valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible(valid_classes_ordered, input_value, spec_property_naming) + valid_classes_coercible = remove_uncoercible( + valid_classes_ordered, input_value, spec_property_naming) if not valid_classes_coercible or key_type: # we do not handle keytype errors, json will take care # of this for us if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, key_type=key_type) + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=key_type) for valid_class in valid_classes_coercible: try: if issubclass(valid_class, OpenApiModel): - return deserialize_model( - input_value, valid_class, path_to_item, check_type, configuration, spec_property_naming - ) + return deserialize_model(input_value, valid_class, + path_to_item, check_type, + configuration, spec_property_naming) elif valid_class == file_type: return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, path_to_item) + return deserialize_primitive(input_value, valid_class, + path_to_item) except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: if must_convert: raise conversion_exc @@ -1399,12 +1489,10 @@ def is_type_nullable(input_type): return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get("oneOf", ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get("anyOf", ()): - if is_type_nullable(t): - return True + for t in input_type._composed_schemas.get('oneOf', ()): + if is_type_nullable(t): return True + for t in input_type._composed_schemas.get('anyOf', ()): + if is_type_nullable(t): return True return False @@ -1418,20 +1506,13 @@ def is_valid_type(input_class_simple, valid_classes): Returns: bool """ - if issubclass(input_class_simple, OpenApiModel) and valid_classes == ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ): + if issubclass(input_class_simple, OpenApiModel) and \ + valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): return True valid_type = input_class_simple in valid_classes - if not valid_type and (issubclass(input_class_simple, OpenApiModel) or input_class_simple is none_type): + if not valid_type and ( + issubclass(input_class_simple, OpenApiModel) or + input_class_simple is none_type): for valid_class in valid_classes: if input_class_simple is none_type and is_type_nullable(valid_class): # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. @@ -1439,16 +1520,17 @@ def is_valid_type(input_class_simple, valid_classes): if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): continue discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = valid_class.discriminator[discr_propertyname_py].values() + discriminator_classes = ( + valid_class.discriminator[discr_propertyname_py].values() + ) valid_type = is_valid_type(input_class_simple, discriminator_classes) if valid_type: return True return valid_type -def validate_and_convert_types( - input_value, required_types_mixed, path_to_item, spec_property_naming, _check_type, configuration=None -): +def validate_and_convert_types(input_value, required_types_mixed, path_to_item, + spec_property_naming, _check_type, configuration=None): """Raises a TypeError is there is a problem, otherwise returns value Args: @@ -1493,18 +1575,18 @@ def validate_and_convert_types( spec_property_naming, key_type=False, must_convert=True, - check_type=_check_type, + check_type=_check_type ) return converted_instance else: - raise get_type_error(input_value, path_to_item, valid_classes, key_type=False) + raise get_type_error(input_value, path_to_item, valid_classes, + key_type=False) # input_value's type is in valid_classes if len(valid_classes) > 1 and configuration: # there are valid classes which are not the current class valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False - ) + valid_classes, input_value, spec_property_naming, must_convert=False) if valid_classes_coercible: converted_instance = attempt_convert_item( input_value, @@ -1514,7 +1596,7 @@ def validate_and_convert_types( spec_property_naming, key_type=False, must_convert=False, - check_type=_check_type, + check_type=_check_type ) return converted_instance @@ -1522,7 +1604,9 @@ def validate_and_convert_types( # all types are of the required types and there are no more inner # variables left to look at return input_value - inner_required_types = child_req_types_by_current_type.get(type(input_value)) + inner_required_types = child_req_types_by_current_type.get( + type(input_value) + ) if inner_required_types is None: # for this type, there are not more inner variables left to look at return input_value @@ -1539,7 +1623,7 @@ def validate_and_convert_types( inner_path, spec_property_naming, _check_type, - configuration=configuration, + configuration=configuration ) elif isinstance(input_value, dict): if input_value == {}: @@ -1549,14 +1633,15 @@ def validate_and_convert_types( inner_path = list(path_to_item) inner_path.append(inner_key) if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, key_type=True) + raise get_type_error(inner_key, inner_path, valid_classes, + key_type=True) input_value[inner_key] = validate_and_convert_types( inner_val, inner_required_types, inner_path, spec_property_naming, _check_type, - configuration=configuration, + configuration=configuration ) return input_value @@ -1573,9 +1658,7 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} - extract_item = lambda item: ( - (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], "_data_store") else item - ) + extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item model_instances = [model_instance] if model_instance._composed_schemas: @@ -1595,26 +1678,32 @@ def model_to_dict(model_instance, serialize=True): except KeyError: used_fallback_python_attribute_names.add(attr) if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map(extract_item, v.items()))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map( + extract_item, + v.items() + ))) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res elif isinstance(value, dict): - result[attr] = dict(map(extract_item, value.items())) + result[attr] = dict(map( + extract_item, + value.items() + )) elif isinstance(value, ModelSimple): result[attr] = value.value - elif hasattr(value, "_data_store"): + elif hasattr(value, '_data_store'): result[attr] = model_to_dict(value, serialize=serialize) else: result[attr] = value @@ -1632,7 +1721,8 @@ def model_to_dict(model_instance, serialize=True): return result -def type_error_message(var_value=None, var_name=None, valid_classes=None, key_type=None): +def type_error_message(var_value=None, var_name=None, valid_classes=None, + key_type=None): """ Keyword Args: var_value (any): the variable which has the type_error @@ -1643,26 +1733,30 @@ def type_error_message(var_value=None, var_name=None, valid_classes=None, key_ty True if it is a key in a dict False if our item is an item in a list """ - key_or_value = "value" + key_or_value = 'value' if key_type: - key_or_value = "key" + key_or_value = 'key' valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = "Invalid type for variable '{0}'. Required {1} type {2} and passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, + msg = ( + "Invalid type for variable '{0}'. Required {1} type {2} and " + "passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, + ) ) return msg def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" + """Returns a string phrase describing what types are allowed + """ all_classes = list(input_classes) all_classes = sorted(all_classes, key=lambda cls: cls.__name__) all_class_names = [cls.__name__ for cls in all_classes] if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) + return 'is {0}'.format(all_class_names[0]) return "is one of [{0}]".format(", ".join(all_class_names)) @@ -1684,10 +1778,10 @@ def get_allof_instances(self, model_args, constant_args): composed_instances (list) """ composed_instances = [] - for allof_class in self._composed_schemas["allOf"]: + for allof_class in self._composed_schemas['allOf']: try: - if constant_args.get("_spec_property_naming"): + if constant_args.get('_spec_property_naming'): allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) else: allof_instance = allof_class(**model_args, **constant_args) @@ -1696,7 +1790,12 @@ def get_allof_instances(self, model_args, constant_args): raise ApiValueError( "Invalid inputs given to generate an instance of '%s'. The " "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % (allof_class.__name__, allof_class.__name__, self.__class__.__name__, str(ex)) + "schema '%s'. Error=%s" % ( + allof_class.__name__, + allof_class.__name__, + self.__class__.__name__, + str(ex) + ) ) from ex return composed_instances @@ -1729,13 +1828,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): Returns oneof_instance (instance) """ - if len(cls._composed_schemas["oneOf"]) == 0: + if len(cls._composed_schemas['oneOf']) == 0: return None oneof_instances = [] # Iterate over each oneOf schema and determine if the input data # matches the oneOf schemas. - for oneof_class in cls._composed_schemas["oneOf"]: + for oneof_class in cls._composed_schemas['oneOf']: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if oneof_class is none_type: @@ -1747,13 +1846,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): try: if not single_value_input: - if constant_kwargs.get("_spec_property_naming"): + if constant_kwargs.get('_spec_property_naming'): oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) else: oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) else: if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get("_spec_property_naming"): + if constant_kwargs.get('_spec_property_naming'): oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) else: oneof_instance = oneof_class(model_arg, **constant_kwargs) @@ -1761,24 +1860,25 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): oneof_instance = validate_and_convert_types( model_arg, (oneof_class,), - constant_kwargs["_path_to_item"], - constant_kwargs["_spec_property_naming"], - constant_kwargs["_check_type"], - configuration=constant_kwargs["_configuration"], + constant_kwargs['_path_to_item'], + constant_kwargs['_spec_property_naming'], + constant_kwargs['_check_type'], + configuration=constant_kwargs['_configuration'] ) oneof_instances.append(oneof_instance) except Exception: pass if len(oneof_instances) == 0: raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the oneOf schemas matched the input data." - % cls.__name__ + "Invalid inputs given to generate an instance of %s. None " + "of the oneOf schemas matched the input data." % + cls.__name__ ) elif len(oneof_instances) > 1: raise ApiValueError( "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." - % cls.__name__ + "oneOf schemas matched the inputs, but a max of one is allowed." % + cls.__name__ ) return oneof_instances[0] @@ -1798,10 +1898,10 @@ def get_anyof_instances(self, model_args, constant_args): anyof_instances (list) """ anyof_instances = [] - if len(self._composed_schemas["anyOf"]) == 0: + if len(self._composed_schemas['anyOf']) == 0: return anyof_instances - for anyof_class in self._composed_schemas["anyOf"]: + for anyof_class in self._composed_schemas['anyOf']: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if anyof_class is none_type: @@ -1810,7 +1910,7 @@ def get_anyof_instances(self, model_args, constant_args): continue try: - if constant_args.get("_spec_property_naming"): + if constant_args.get('_spec_property_naming'): anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) else: anyof_instance = anyof_class(**model_args, **constant_args) @@ -1819,8 +1919,9 @@ def get_anyof_instances(self, model_args, constant_args): pass if len(anyof_instances) == 0: raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the anyOf schemas matched the inputs." - % self.__class__.__name__ + "Invalid inputs given to generate an instance of %s. None of the " + "anyOf schemas matched the inputs." % + self.__class__.__name__ ) return anyof_instances @@ -1834,7 +1935,7 @@ def get_discarded_args(self, composed_instances, model_args): # arguments passed to self were already converted to python names # before __init__ was called for instance in composed_instances: - if instance.__class__ in self._composed_schemas["allOf"]: + if instance.__class__ in self._composed_schemas['allOf']: try: keys = instance.to_dict().keys() discarded_keys = model_args - keys @@ -1929,4 +2030,9 @@ def validate_get_composed_info(constant_args, model_args, self): if prop_name not in discarded_args: var_name_to_model_instances[prop_name] = [self] + composed_instances - return [composed_instances, var_name_to_model_instances, additional_properties_model_instances, discarded_args] + return [ + composed_instances, + var_name_to_model_instances, + additional_properties_model_instances, + discarded_args + ] diff --git a/generated/groundlight_openapi_client/models/__init__.py b/generated/groundlight_openapi_client/models/__init__.py index e9de218b..a7877c28 100644 --- a/generated/groundlight_openapi_client/models/__init__.py +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -18,6 +18,7 @@ from groundlight_openapi_client.model.b_box_geometry_request import BBoxGeometryRequest from groundlight_openapi_client.model.binary_classification_result import BinaryClassificationResult from groundlight_openapi_client.model.blank_enum import BlankEnum +from groundlight_openapi_client.model.bounding_box_label_enum import BoundingBoxLabelEnum from groundlight_openapi_client.model.bounding_box_mode_configuration import BoundingBoxModeConfiguration from groundlight_openapi_client.model.bounding_box_result import BoundingBoxResult from groundlight_openapi_client.model.channel_enum import ChannelEnum diff --git a/generated/groundlight_openapi_client/rest.py b/generated/groundlight_openapi_client/rest.py index 16d8ca86..16efe8df 100644 --- a/generated/groundlight_openapi_client/rest.py +++ b/generated/groundlight_openapi_client/rest.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import io import json import logging @@ -19,20 +20,14 @@ import urllib3 import ipaddress -from groundlight_openapi_client.exceptions import ( - ApiException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException, - ApiValueError, -) +from groundlight_openapi_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError logger = logging.getLogger(__name__) class RESTResponse(io.IOBase): + def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -49,6 +44,7 @@ def getheader(self, name, default=None): class RESTClientObject(object): + def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -64,13 +60,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args["assert_hostname"] = configuration.assert_hostname # noqa: E501 + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - addition_pool_args["retries"] = configuration.retries + addition_pool_args['retries'] = configuration.retries if configuration.socket_options is not None: - addition_pool_args["socket_options"] = configuration.socket_options + addition_pool_args['socket_options'] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -79,7 +75,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ""): + if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, @@ -89,7 +85,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, - **addition_pool_args, + **addition_pool_args ) else: self.pool_manager = urllib3.PoolManager( @@ -99,20 +95,12 @@ def __init__(self, configuration, pools_size=4, maxsize=None): ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, - **addition_pool_args, + **addition_pool_args ) - def request( - self, - method, - url, - query_params=None, - headers=None, - body=None, - post_params=None, - _preload_content=True, - _request_timeout=None, - ): + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): """Perform requests. :param method: http request method @@ -132,10 +120,13 @@ 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 {} @@ -144,66 +135,60 @@ def request( if _request_timeout: if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 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']: # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != "DELETE") and ("Content-Type" not in headers): - headers["Content-Type"] = "application/json" + if (method != 'DELETE') and ('Content-Type' not in headers): + headers['Content-Type'] = 'application/json' if query_params: - url += "?" + urlencode(query_params) - if ("Content-Type" not in headers) or (re.search("json", headers["Content-Type"], re.IGNORECASE)): + url += '?' + urlencode(query_params) + if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, - url, + method, url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 r = self.pool_manager.request( - method, - url, + method, url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) - elif headers["Content-Type"] == "multipart/form-data": + headers=headers) + elif headers['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, + method, url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) + headers=headers) # 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, + method, url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers, - ) + headers=headers) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -212,9 +197,11 @@ def request( raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request( - method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers - ) + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) @@ -242,134 +229,84 @@ def request( return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): - return self.request( - "GET", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): - return self.request( - "HEAD", - url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params, - ) - - def OPTIONS( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "OPTIONS", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): - return self.request( - "DELETE", - url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def POST( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "POST", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def PUT( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PUT", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - - def PATCH( - self, - url, - headers=None, - query_params=None, - post_params=None, - body=None, - _preload_content=True, - _request_timeout=None, - ): - return self.request( - "PATCH", - url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body, - ) - + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) # end of class RESTClientObject def is_ipv4(target): - """Test if IPv4 address or not""" + """ Test if IPv4 address or not + """ try: - chk = ipaddress.IPv4Address(target) - return True + chk = ipaddress.IPv4Address(target) + return True except ipaddress.AddressValueError: - return False - + return False def in_ipv4net(target, net): - """Test if target belongs to given IPv4 network""" + """ Test if target belongs to given IPv4 network + """ try: nw = ipaddress.IPv4Network(net) ip = ipaddress.IPv4Address(target) @@ -381,29 +318,30 @@ def in_ipv4net(target, net): except ipaddress.NetmaskValueError: return False - def should_bypass_proxies(url, no_proxy=None): - """Yet another requests.should_bypass_proxies + """ Yet another requests.should_bypass_proxies Test if proxies should not be used for a particular url. """ parsed = urlparse(url) # special cases - if parsed.hostname in [None, ""]: + if parsed.hostname in [None, '']: return True # special cases - if no_proxy in [None, ""]: + if no_proxy in [None , '']: return False - if no_proxy == "*": + if no_proxy == '*': return True - no_proxy = no_proxy.lower().replace(" ", "") - entries = (host for host in no_proxy.split(",") if host) + no_proxy = no_proxy.lower().replace(' ',''); + entries = ( + host for host in no_proxy.split(',') if host + ) if is_ipv4(parsed.hostname): for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {"no": no_proxy}) + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) diff --git a/generated/setup.py b/generated/setup.py index 9c4bb572..4366b879 100644 --- a/generated/setup.py +++ b/generated/setup.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + from setuptools import setup, find_packages # noqa: H301 NAME = "groundlight-openapi-client" @@ -20,8 +21,8 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3", + "python-dateutil", ] setup( @@ -38,5 +39,5 @@ include_package_data=True, long_description="""\ Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 - """, + """ ) diff --git a/generated/test/test_bounding_box_label_enum.py b/generated/test/test_bounding_box_label_enum.py new file mode 100644 index 00000000..31c4df49 --- /dev/null +++ b/generated/test/test_bounding_box_label_enum.py @@ -0,0 +1,36 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + + +import sys +import unittest + +import groundlight_openapi_client +from groundlight_openapi_client.model.bounding_box_label_enum import BoundingBoxLabelEnum + + +class TestBoundingBoxLabelEnum(unittest.TestCase): + """BoundingBoxLabelEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBoundingBoxLabelEnum(self): + """Test BoundingBoxLabelEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = BoundingBoxLabelEnum() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() From 2b7c6b28771129c70dbdab881b405cf955c4a46c Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Sat, 18 Oct 2025 00:18:34 +0000 Subject: [PATCH 3/6] bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3c6c5a57..5038df0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ {include = "**/*.py", from = "src"}, ] readme = "README.md" -version = "0.23.2" +version = "0.23.3" [tool.poetry.dependencies] # For certifi, use ">=" instead of "^" since it upgrades its "major version" every year, not really following semver From 4cb869c63fa5f700d28bfdeb24494b64d2a5a329 Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Mon, 20 Oct 2025 16:50:34 +0000 Subject: [PATCH 4/6] update datamodel-code-generator and regenerate --- generated/.openapi-generator/FILES | 1 - .../api/actions_api.py | 564 +++++-------- .../api/detector_groups_api.py | 200 ++--- .../api/detector_reset_api.py | 105 +-- .../api/detectors_api.py | 741 ++++++------------ .../api/edge_api.py | 195 ++--- .../api/image_queries_api.py | 519 +++++------- .../api/labels_api.py | 110 +-- .../api/month_to_date_account_info_api.py | 94 +-- .../api/notes_api.py | 219 ++---- .../api/user_api.py | 94 +-- .../groundlight_openapi_client/api_client.py | 556 +++++++------ .../apis/__init__.py | 1 - .../configuration.py | 266 ++++--- .../groundlight_openapi_client/exceptions.py | 17 +- .../model/account_month_to_date_info.py | 131 ++-- .../model/action.py | 104 +-- .../model/action_list.py | 67 +- .../model/all_notes.py | 100 ++- .../model/annotations_requested_enum.py | 68 +- .../model/b_box_geometry.py | 115 +-- .../model/b_box_geometry_request.py | 106 +-- .../model/binary_classification_result.py | 117 +-- .../model/blank_enum.py | 66 +- .../model/bounding_box_label_enum.py | 72 +- .../model/bounding_box_mode_configuration.py | 101 +-- .../model/bounding_box_result.py | 117 +-- .../model/channel_enum.py | 68 +- .../model/condition.py | 98 ++- .../model/condition_request.py | 98 ++- .../model/count_mode_configuration.py | 101 +-- .../model/counting_result.py | 128 +-- .../model/detector.py | 204 +++-- .../model/detector_creation_input_request.py | 196 +++-- .../model/detector_group.py | 98 ++- .../model/detector_group_request.py | 97 ++- .../model/detector_type_enum.py | 66 +- .../model/edge_model_info.py | 148 ++-- .../model/escalation_type_enum.py | 68 +- .../model/image_query.py | 234 ++++-- .../model/image_query_type_enum.py | 66 +- .../model/inline_response200.py | 96 ++- .../model/inline_response2001.py | 100 ++- .../inline_response2001_evaluation_results.py | 217 +++-- .../model/inline_response2002.py | 94 ++- .../model/inline_response200_summary.py | 118 +-- ...inline_response200_summary_class_counts.py | 110 +-- .../groundlight_openapi_client/model/label.py | 70 +- .../model/label_value.py | 154 ++-- .../model/label_value_request.py | 111 +-- .../model/mode_enum.py | 74 +- .../model/multi_class_mode_configuration.py | 98 ++- .../model/multi_classification_result.py | 117 +-- .../groundlight_openapi_client/model/note.py | 107 +-- .../model/note_request.py | 111 +-- .../model/paginated_detector_list.py | 114 +-- .../model/paginated_image_query_list.py | 114 +-- .../model/paginated_rule_list.py | 114 +-- .../model/patched_detector_request.py | 143 ++-- .../model/payload_template.py | 101 ++- .../model/payload_template_request.py | 102 ++- .../model/result_type_enum.py | 74 +- .../groundlight_openapi_client/model/roi.py | 103 +-- .../model/roi_request.py | 101 ++- .../groundlight_openapi_client/model/rule.py | 176 +++-- .../model/rule_request.py | 163 ++-- .../model/snooze_time_unit_enum.py | 72 +- .../model/source.py | 82 +- .../model/source_enum.py | 86 +- .../model/status_enum.py | 68 +- .../model/text_mode_configuration.py | 97 ++- .../model/text_recognition_result.py | 124 +-- .../model/verb_enum.py | 74 +- .../model/webhook_action.py | 133 ++-- .../model/webhook_action_request.py | 135 ++-- .../groundlight_openapi_client/model_utils.py | 690 +++++++--------- generated/groundlight_openapi_client/rest.py | 312 +++++--- generated/model.py | 40 +- generated/setup.py | 7 +- .../test/test_bounding_box_label_enum.py | 3 +- pyproject.toml | 2 +- 81 files changed, 5679 insertions(+), 5644 deletions(-) diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 76a4b875..d8fdc5e5 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -156,5 +156,4 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_bounding_box_label_enum.py tox.ini diff --git a/generated/groundlight_openapi_client/api/actions_api.py b/generated/groundlight_openapi_client/api/actions_api.py index 69adca06..b4d3ebd2 100644 --- a/generated/groundlight_openapi_client/api/actions_api.py +++ b/generated/groundlight_openapi_client/api/actions_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.paginated_rule_list import PaginatedRuleList from groundlight_openapi_client.model.rule import Rule @@ -40,291 +39,224 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_rule_endpoint = _Endpoint( settings={ - 'response_type': (Rule,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/actions/detector/{detector_id}/rules', - 'operation_id': 'create_rule', - 'http_method': 'POST', - 'servers': None, + "response_type": (Rule,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/actions/detector/{detector_id}/rules", + "operation_id": "create_rule", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'rule_request', - ], - 'required': [ - 'detector_id', - 'rule_request', + "all": [ + "detector_id", + "rule_request", ], - 'nullable': [ + "required": [ + "detector_id", + "rule_request", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "rule_request": (RuleRequest,), }, - 'openapi_types': { - 'detector_id': - (str,), - 'rule_request': - (RuleRequest,), + "attribute_map": { + "detector_id": "detector_id", }, - 'attribute_map': { - 'detector_id': 'detector_id', + "location_map": { + "detector_id": "path", + "rule_request": "body", }, - 'location_map': { - 'detector_id': 'path', - 'rule_request': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ] + "accept": ["application/json"], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], }, - api_client=api_client + api_client=api_client, ) self.delete_rule_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/actions/rules/{id}', - 'operation_id': 'delete_rule', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/actions/rules/{id}", + "operation_id": "delete_rule", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (int,), }, - 'openapi_types': { - 'id': - (int,), + "attribute_map": { + "id": "id", }, - 'attribute_map': { - 'id': 'id', + "location_map": { + "id": "path", }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_rule_endpoint = _Endpoint( settings={ - 'response_type': (Rule,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/actions/rules/{id}', - 'operation_id': 'get_rule', - 'http_method': 'GET', - 'servers': None, + "response_type": (Rule,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/actions/rules/{id}", + "operation_id": "get_rule", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (int,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (int,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.list_detector_rules_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedRuleList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/actions/detector/{detector_id}/rules', - 'operation_id': 'list_detector_rules', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedRuleList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/actions/detector/{detector_id}/rules", + "operation_id": "list_detector_rules", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'page', - 'page_size', - ], - 'required': [ - 'detector_id', - ], - 'nullable': [ + "all": [ + "detector_id", + "page", + "page_size", ], - 'enum': [ + "required": [ + "detector_id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "page": (int,), + "page_size": (int,), }, - 'allowed_values': { + "attribute_map": { + "detector_id": "detector_id", + "page": "page", + "page_size": "page_size", }, - 'openapi_types': { - 'detector_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), + "location_map": { + "detector_id": "path", + "page": "query", + "page_size": "query", }, - 'attribute_map': { - 'detector_id': 'detector_id', - 'page': 'page', - 'page_size': 'page_size', - }, - 'location_map': { - 'detector_id': 'path', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.list_rules_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedRuleList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/actions/rules', - 'operation_id': 'list_rules', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedRuleList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/actions/rules", + "operation_id": "list_rules", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - 'predictor_id', + "all": [ + "page", + "page_size", + "predictor_id", ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), - 'predictor_id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), + "predictor_id": (str,), }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'page_size', - 'predictor_id': 'predictor_id', + "attribute_map": { + "page": "page", + "page_size": "page_size", + "predictor_id": "predictor_id", }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', - 'predictor_id': 'query', + "location_map": { + "page": "query", + "page_size": "query", + "predictor_id": "query", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def create_rule( - self, - detector_id, - rule_request, - **kwargs - ): + def create_rule(self, detector_id, rule_request, **kwargs): """create_rule # noqa: E501 Create a new rule for a detector # noqa: E501 @@ -371,41 +303,20 @@ def create_rule( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id - kwargs['rule_request'] = \ - rule_request + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id + kwargs["rule_request"] = rule_request return self.create_rule_endpoint.call_with_http_info(**kwargs) - def delete_rule( - self, - id, - **kwargs - ): + def delete_rule(self, id, **kwargs): """delete_rule # noqa: E501 Delete a rule # noqa: E501 @@ -451,39 +362,19 @@ def delete_rule( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.delete_rule_endpoint.call_with_http_info(**kwargs) - def get_rule( - self, - id, - **kwargs - ): + def get_rule(self, id, **kwargs): """get_rule # noqa: E501 Retrieve a rule # noqa: E501 @@ -529,39 +420,19 @@ def get_rule( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.get_rule_endpoint.call_with_http_info(**kwargs) - def list_detector_rules( - self, - detector_id, - **kwargs - ): + def list_detector_rules(self, detector_id, **kwargs): """list_detector_rules # noqa: E501 List all rules for a detector # noqa: E501 @@ -609,38 +480,19 @@ def list_detector_rules( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.list_detector_rules_endpoint.call_with_http_info(**kwargs) - def list_rules( - self, - **kwargs - ): + def list_rules(self, **kwargs): """list_rules # noqa: E501 Lists all rules over all detectors owned by the requester. # noqa: E501 @@ -687,29 +539,13 @@ def list_rules( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.list_rules_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/detector_groups_api.py b/generated/groundlight_openapi_client/api/detector_groups_api.py index 4088d2ba..83a2cb4f 100644 --- a/generated/groundlight_openapi_client/api/detector_groups_api.py +++ b/generated/groundlight_openapi_client/api/detector_groups_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.detector_group import DetectorGroup from groundlight_openapi_client.model.detector_group_request import DetectorGroupRequest @@ -39,108 +38,68 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_detector_group_endpoint = _Endpoint( settings={ - 'response_type': (DetectorGroup,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detector-groups', - 'operation_id': 'create_detector_group', - 'http_method': 'POST', - 'servers': None, + "response_type": (DetectorGroup,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detector-groups", + "operation_id": "create_detector_group", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'detector_group_request', - ], - 'required': [ - 'detector_group_request', + "all": [ + "detector_group_request", ], - 'nullable': [ + "required": [ + "detector_group_request", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_group_request": (DetectorGroupRequest,), }, - 'openapi_types': { - 'detector_group_request': - (DetectorGroupRequest,), + "attribute_map": {}, + "location_map": { + "detector_group_request": "body", }, - 'attribute_map': { - }, - 'location_map': { - 'detector_group_request': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ] + "accept": ["application/json"], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], }, - api_client=api_client + api_client=api_client, ) self.get_detector_groups_endpoint = _Endpoint( settings={ - 'response_type': ([DetectorGroup],), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detector-groups', - 'operation_id': 'get_detector_groups', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": ([DetectorGroup],), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detector-groups", + "operation_id": "get_detector_groups", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def create_detector_group( - self, - detector_group_request, - **kwargs - ): + def create_detector_group(self, detector_group_request, **kwargs): """create_detector_group # noqa: E501 Create a new detector group POST data: Required: - name (str) - name of the predictor set # noqa: E501 @@ -186,38 +145,19 @@ def create_detector_group( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_group_request'] = \ - detector_group_request + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_group_request"] = detector_group_request return self.create_detector_group_endpoint.call_with_http_info(**kwargs) - def get_detector_groups( - self, - **kwargs - ): + def get_detector_groups(self, **kwargs): """get_detector_groups # noqa: E501 List all detector groups # noqa: E501 @@ -261,29 +201,13 @@ def get_detector_groups( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.get_detector_groups_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/detector_reset_api.py b/generated/groundlight_openapi_client/api/detector_reset_api.py index 1337ff20..c50532f8 100644 --- a/generated/groundlight_openapi_client/api/detector_reset_api.py +++ b/generated/groundlight_openapi_client/api/detector_reset_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) @@ -37,59 +36,46 @@ def __init__(self, api_client=None): self.api_client = api_client self.reset_detector_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detector-reset/{id}', - 'operation_id': 'reset_detector', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/detector-reset/{id}", + "operation_id": "reset_detector", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def reset_detector( - self, - id, - **kwargs - ): + def reset_detector(self, id, **kwargs): """reset_detector # noqa: E501 Deletes all image queries on the detector # noqa: E501 @@ -135,31 +121,14 @@ def reset_detector( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.reset_detector_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/detectors_api.py b/generated/groundlight_openapi_client/api/detectors_api.py index a8a1be67..eca18f45 100644 --- a/generated/groundlight_openapi_client/api/detectors_api.py +++ b/generated/groundlight_openapi_client/api/detectors_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.detector import Detector from groundlight_openapi_client.model.detector_creation_input_request import DetectorCreationInputRequest @@ -43,377 +42,286 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_detector_endpoint = _Endpoint( settings={ - 'response_type': (Detector,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors', - 'operation_id': 'create_detector', - 'http_method': 'POST', - 'servers': None, + "response_type": (Detector,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors", + "operation_id": "create_detector", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'detector_creation_input_request', - ], - 'required': [ - 'detector_creation_input_request', + "all": [ + "detector_creation_input_request", ], - 'nullable': [ + "required": [ + "detector_creation_input_request", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_creation_input_request': - (DetectorCreationInputRequest,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_creation_input_request": (DetectorCreationInputRequest,), }, - 'attribute_map': { + "attribute_map": {}, + "location_map": { + "detector_creation_input_request": "body", }, - 'location_map': { - 'detector_creation_input_request': 'body', - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] + "collection_format_map": {}, }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, ) self.delete_detector_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{id}', - 'operation_id': 'delete_detector', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{id}", + "operation_id": "delete_detector", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', + "location_map": { + "id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_detector_endpoint = _Endpoint( settings={ - 'response_type': (Detector,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{id}', - 'operation_id': 'get_detector', - 'http_method': 'GET', - 'servers': None, + "response_type": (Detector,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{id}", + "operation_id": "get_detector", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_detector_evaluation_endpoint = _Endpoint( settings={ - 'response_type': (InlineResponse2001,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{id}/evaluation', - 'operation_id': 'get_detector_evaluation', - 'http_method': 'GET', - 'servers': None, + "response_type": (InlineResponse2001,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{id}/evaluation", + "operation_id": "get_detector_evaluation", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_detector_metrics_endpoint = _Endpoint( settings={ - 'response_type': (InlineResponse200,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{detector_id}/metrics', - 'operation_id': 'get_detector_metrics', - 'http_method': 'GET', - 'servers': None, + "response_type": (InlineResponse200,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{detector_id}/metrics", + "operation_id": "get_detector_metrics", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - ], - 'required': [ - 'detector_id', - ], - 'nullable': [ + "all": [ + "detector_id", ], - 'enum': [ + "required": [ + "detector_id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), }, - 'allowed_values': { + "attribute_map": { + "detector_id": "detector_id", }, - 'openapi_types': { - 'detector_id': - (str,), + "location_map": { + "detector_id": "path", }, - 'attribute_map': { - 'detector_id': 'detector_id', - }, - 'location_map': { - 'detector_id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.list_detectors_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedDetectorList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors', - 'operation_id': 'list_detectors', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedDetectorList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors", + "operation_id": "list_detectors", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "all": [ + "page", + "page_size", + ], + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'page': - (int,), - 'page_size': - (int,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), }, - 'attribute_map': { - 'page': 'page', - 'page_size': 'page_size', + "attribute_map": { + "page": "page", + "page_size": "page_size", }, - 'location_map': { - 'page': 'query', - 'page_size': 'query', + "location_map": { + "page": "query", + "page_size": "query", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.update_detector_endpoint = _Endpoint( settings={ - 'response_type': (Detector,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{id}', - 'operation_id': 'update_detector', - 'http_method': 'PATCH', - 'servers': None, + "response_type": (Detector,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{id}", + "operation_id": "update_detector", + "http_method": "PATCH", + "servers": None, }, params_map={ - 'all': [ - 'id', - 'patched_detector_request', - ], - 'required': [ - 'id', + "all": [ + "id", + "patched_detector_request", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'id': - (str,), - 'patched_detector_request': - (PatchedDetectorRequest,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), + "patched_detector_request": (PatchedDetectorRequest,), }, - 'attribute_map': { - 'id': 'id', + "attribute_map": { + "id": "id", }, - 'location_map': { - 'id': 'path', - 'patched_detector_request': 'body', + "location_map": { + "id": "path", + "patched_detector_request": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ] + "accept": ["application/json"], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], }, - api_client=api_client + api_client=api_client, ) - def create_detector( - self, - detector_creation_input_request, - **kwargs - ): + def create_detector(self, detector_creation_input_request, **kwargs): """create_detector # noqa: E501 Create a new detector. # noqa: E501 @@ -459,39 +367,19 @@ def create_detector( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_creation_input_request'] = \ - detector_creation_input_request + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_creation_input_request"] = detector_creation_input_request return self.create_detector_endpoint.call_with_http_info(**kwargs) - def delete_detector( - self, - id, - **kwargs - ): + def delete_detector(self, id, **kwargs): """delete_detector # noqa: E501 Delete a detector by its ID. # noqa: E501 @@ -537,39 +425,19 @@ def delete_detector( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.delete_detector_endpoint.call_with_http_info(**kwargs) - def get_detector( - self, - id, - **kwargs - ): + def get_detector(self, id, **kwargs): """get_detector # noqa: E501 Retrieve a detector by its ID. # noqa: E501 @@ -615,39 +483,19 @@ def get_detector( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.get_detector_endpoint.call_with_http_info(**kwargs) - def get_detector_evaluation( - self, - id, - **kwargs - ): + def get_detector_evaluation(self, id, **kwargs): """get_detector_evaluation # noqa: E501 Get Detector evaluation results. The result is null if there isn't enough ground truth data to evaluate the detector. Returns the time of the evaulation, total ground truth labels, the ml based kfold accuracies, and the system accuracies at different confidence thresholds # noqa: E501 @@ -693,39 +541,19 @@ def get_detector_evaluation( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.get_detector_evaluation_endpoint.call_with_http_info(**kwargs) - def get_detector_metrics( - self, - detector_id, - **kwargs - ): + def get_detector_metrics(self, detector_id, **kwargs): """get_detector_metrics # noqa: E501 Get Detector metrics, primarily the counts of different types of labels # noqa: E501 @@ -771,38 +599,19 @@ def get_detector_metrics( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.get_detector_metrics_endpoint.call_with_http_info(**kwargs) - def list_detectors( - self, - **kwargs - ): + def list_detectors(self, **kwargs): """list_detectors # noqa: E501 Retrieve a list of detectors. # noqa: E501 @@ -848,37 +657,18 @@ def list_detectors( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.list_detectors_endpoint.call_with_http_info(**kwargs) - def update_detector( - self, - id, - **kwargs - ): + def update_detector(self, id, **kwargs): """update_detector # noqa: E501 Update a detector # noqa: E501 @@ -925,31 +715,14 @@ def update_detector( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.update_detector_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/edge_api.py b/generated/groundlight_openapi_client/api/edge_api.py index 09229eb0..a0b3187d 100644 --- a/generated/groundlight_openapi_client/api/edge_api.py +++ b/generated/groundlight_openapi_client/api/edge_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo @@ -38,102 +37,70 @@ def __init__(self, api_client=None): self.api_client = api_client self.edge_report_metrics_create_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/edge/report-metrics', - 'operation_id': 'edge_report_metrics_create', - 'http_method': 'POST', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/report-metrics", + "operation_id": "edge_report_metrics_create", + "http_method": "POST", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [], + "accept": [], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_model_urls_endpoint = _Endpoint( settings={ - 'response_type': (EdgeModelInfo,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/edge/fetch-model-urls/{detector_id}/', - 'operation_id': 'get_model_urls', - 'http_method': 'GET', - 'servers': None, + "response_type": (EdgeModelInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/fetch-model-urls/{detector_id}/", + "operation_id": "get_model_urls", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', + "all": [ + "detector_id", ], - 'required': [ - 'detector_id', + "required": [ + "detector_id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), }, - 'attribute_map': { - 'detector_id': 'detector_id', + "attribute_map": { + "detector_id": "detector_id", }, - 'location_map': { - 'detector_id': 'path', + "location_map": { + "detector_id": "path", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def edge_report_metrics_create( - self, - **kwargs - ): + def edge_report_metrics_create(self, **kwargs): """edge_report_metrics_create # noqa: E501 Edge server periodically calls this to report metrics. POST body will have JSON data that we log. # noqa: E501 @@ -177,37 +144,18 @@ def edge_report_metrics_create( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.edge_report_metrics_create_endpoint.call_with_http_info(**kwargs) - def get_model_urls( - self, - detector_id, - **kwargs - ): + def get_model_urls(self, detector_id, **kwargs): """get_model_urls # noqa: E501 Gets time limited pre-authenticated URLs to download a detector's edge model and oodd model. # noqa: E501 @@ -253,31 +201,14 @@ def get_model_urls( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.get_model_urls_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/image_queries_api.py b/generated/groundlight_openapi_client/api/image_queries_api.py index 8c601a07..03ad2600 100644 --- a/generated/groundlight_openapi_client/api/image_queries_api.py +++ b/generated/groundlight_openapi_client/api/image_queries_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.image_query import ImageQuery from groundlight_openapi_client.model.paginated_image_query_list import PaginatedImageQueryList @@ -39,275 +38,218 @@ def __init__(self, api_client=None): self.api_client = api_client self.get_image_endpoint = _Endpoint( settings={ - 'response_type': (file_type,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/image-queries/{id}/image', - 'operation_id': 'get_image', - 'http_method': 'GET', - 'servers': None, + "response_type": (file_type,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/image-queries/{id}/image", + "operation_id": "get_image", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'image/jpeg' - ], - 'content_type': [], + "accept": ["image/jpeg"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.get_image_query_endpoint = _Endpoint( settings={ - 'response_type': (ImageQuery,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/image-queries/{id}', - 'operation_id': 'get_image_query', - 'http_method': 'GET', - 'servers': None, + "response_type": (ImageQuery,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/image-queries/{id}", + "operation_id": "get_image_query", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'id', - ], - 'required': [ - 'id', - ], - 'nullable': [ + "all": [ + "id", ], - 'enum': [ + "required": [ + "id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - 'allowed_values': { + "attribute_map": { + "id": "id", }, - 'openapi_types': { - 'id': - (str,), + "location_map": { + "id": "path", }, - 'attribute_map': { - 'id': 'id', - }, - 'location_map': { - 'id': 'path', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.list_image_queries_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedImageQueryList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/image-queries', - 'operation_id': 'list_image_queries', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedImageQueryList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/image-queries", + "operation_id": "list_image_queries", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "detector_id", + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "page": (int,), + "page_size": (int,), }, - 'openapi_types': { - 'detector_id': - (str,), - 'page': - (int,), - 'page_size': - (int,), + "attribute_map": { + "detector_id": "detector_id", + "page": "page", + "page_size": "page_size", }, - 'attribute_map': { - 'detector_id': 'detector_id', - 'page': 'page', - 'page_size': 'page_size', + "location_map": { + "detector_id": "query", + "page": "query", + "page_size": "query", }, - 'location_map': { - 'detector_id': 'query', - 'page': 'query', - 'page_size': 'query', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.submit_image_query_endpoint = _Endpoint( settings={ - 'response_type': (ImageQuery,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/image-queries', - 'operation_id': 'submit_image_query', - 'http_method': 'POST', - 'servers': None, + "response_type": (ImageQuery,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/image-queries", + "operation_id": "submit_image_query", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'confidence_threshold', - 'human_review', - 'image_query_id', - 'inspection_id', - 'metadata', - 'patience_time', - 'want_async', - 'body', + "all": [ + "detector_id", + "confidence_threshold", + "human_review", + "image_query_id", + "inspection_id", + "metadata", + "patience_time", + "want_async", + "body", ], - 'required': [ - 'detector_id', + "required": [ + "detector_id", ], - 'nullable': [ + "nullable": [], + "enum": [], + "validation": [ + "confidence_threshold", ], - 'enum': [ - ], - 'validation': [ - 'confidence_threshold', - ] }, root_map={ - 'validations': { - ('confidence_threshold',): { - - 'inclusive_maximum': 1, - 'inclusive_minimum': 0, + "validations": { + ("confidence_threshold",): { + "inclusive_maximum": 1, + "inclusive_minimum": 0, }, }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_id': - (str,), - 'confidence_threshold': - (float,), - 'human_review': - (str,), - 'image_query_id': - (str,), - 'inspection_id': - (str,), - 'metadata': - (str,), - 'patience_time': - (float,), - 'want_async': - (str,), - 'body': - (file_type,), + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "confidence_threshold": (float,), + "human_review": (str,), + "image_query_id": (str,), + "inspection_id": (str,), + "metadata": (str,), + "patience_time": (float,), + "want_async": (str,), + "body": (file_type,), }, - 'attribute_map': { - 'detector_id': 'detector_id', - 'confidence_threshold': 'confidence_threshold', - 'human_review': 'human_review', - 'image_query_id': 'image_query_id', - 'inspection_id': 'inspection_id', - 'metadata': 'metadata', - 'patience_time': 'patience_time', - 'want_async': 'want_async', + "attribute_map": { + "detector_id": "detector_id", + "confidence_threshold": "confidence_threshold", + "human_review": "human_review", + "image_query_id": "image_query_id", + "inspection_id": "inspection_id", + "metadata": "metadata", + "patience_time": "patience_time", + "want_async": "want_async", }, - 'location_map': { - 'detector_id': 'query', - 'confidence_threshold': 'query', - 'human_review': 'query', - 'image_query_id': 'query', - 'inspection_id': 'query', - 'metadata': 'query', - 'patience_time': 'query', - 'want_async': 'query', - 'body': 'body', + "location_map": { + "detector_id": "query", + "confidence_threshold": "query", + "human_review": "query", + "image_query_id": "query", + "inspection_id": "query", + "metadata": "query", + "patience_time": "query", + "want_async": "query", + "body": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' + "accept": ["application/json"], + "content_type": [ + "image/jpeg", + "image/jpg", + "image/png", + "image/gif", + "image/webp", + "image/bmp", + "image/x-icon", ], - 'content_type': [ - 'image/jpeg', - 'image/jpg', - 'image/png', - 'image/gif', - 'image/webp', - 'image/bmp', - 'image/x-icon' - ] }, - api_client=api_client + api_client=api_client, ) - def get_image( - self, - id, - **kwargs - ): + def get_image(self, id, **kwargs): """get_image # noqa: E501 Retrieve an image by its ID. # noqa: E501 @@ -353,39 +295,19 @@ def get_image( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.get_image_endpoint.call_with_http_info(**kwargs) - def get_image_query( - self, - id, - **kwargs - ): + def get_image_query(self, id, **kwargs): """get_image_query # noqa: E501 Retrieve an image-query by its ID. # noqa: E501 @@ -431,38 +353,19 @@ def get_image_query( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['id'] = \ - id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["id"] = id return self.get_image_query_endpoint.call_with_http_info(**kwargs) - def list_image_queries( - self, - **kwargs - ): + def list_image_queries(self, **kwargs): """list_image_queries # noqa: E501 Retrieve a list of image-queries. # noqa: E501 @@ -509,37 +412,18 @@ def list_image_queries( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.list_image_queries_endpoint.call_with_http_info(**kwargs) - def submit_image_query( - self, - detector_id, - **kwargs - ): + def submit_image_query(self, detector_id, **kwargs): """submit_image_query # noqa: E501 Submit an image query against a detector. You must use `\"Content-Type: image/jpeg\"` or similar (image/png, image/webp, etc) for the image data. For example: ```Bash $ curl https://api.groundlight.ai/device-api/v1/image-queries?detector_id=det_abc123 \\ --header \"Content-Type: image/jpeg\" \\ --data-binary @path/to/filename.jpeg ``` # noqa: E501 @@ -593,31 +477,14 @@ def submit_image_query( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.submit_image_query_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/labels_api.py b/generated/groundlight_openapi_client/api/labels_api.py index 3a9f141d..fd948a9f 100644 --- a/generated/groundlight_openapi_client/api/labels_api.py +++ b/generated/groundlight_openapi_client/api/labels_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.label_value import LabelValue from groundlight_openapi_client.model.label_value_request import LabelValueRequest @@ -39,64 +38,44 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_label_endpoint = _Endpoint( settings={ - 'response_type': (LabelValue,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/labels', - 'operation_id': 'create_label', - 'http_method': 'POST', - 'servers': None, + "response_type": (LabelValue,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/labels", + "operation_id": "create_label", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'label_value_request', - ], - 'required': [ - 'label_value_request', - ], - 'nullable': [ + "all": [ + "label_value_request", ], - 'enum': [ + "required": [ + "label_value_request", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "label_value_request": (LabelValueRequest,), }, - 'allowed_values': { + "attribute_map": {}, + "location_map": { + "label_value_request": "body", }, - 'openapi_types': { - 'label_value_request': - (LabelValueRequest,), - }, - 'attribute_map': { - }, - 'location_map': { - 'label_value_request': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ] + "accept": ["application/json"], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], }, - api_client=api_client + api_client=api_client, ) - def create_label( - self, - label_value_request, - **kwargs - ): + def create_label(self, label_value_request, **kwargs): """create_label # noqa: E501 Create a new LabelValue and attach it to an image query. This will trigger asynchronous fine-tuner model training. # noqa: E501 @@ -142,31 +121,14 @@ def create_label( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['label_value_request'] = \ - label_value_request + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["label_value_request"] = label_value_request return self.create_label_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py b/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py index 1df2695e..ed467035 100644 --- a/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py +++ b/generated/groundlight_openapi_client/api/month_to_date_account_info_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.account_month_to_date_info import AccountMonthToDateInfo @@ -38,53 +37,30 @@ def __init__(self, api_client=None): self.api_client = api_client self.month_to_date_account_info_endpoint = _Endpoint( settings={ - 'response_type': (AccountMonthToDateInfo,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/month-to-date-account-info', - 'operation_id': 'month_to_date_account_info', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (AccountMonthToDateInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/month-to-date-account-info", + "operation_id": "month_to_date_account_info", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def month_to_date_account_info( - self, - **kwargs - ): + def month_to_date_account_info(self, **kwargs): """month_to_date_account_info # noqa: E501 Fetches and returns the account-specific metrics based on the current user's group. # noqa: E501 @@ -128,29 +104,13 @@ def month_to_date_account_info( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.month_to_date_account_info_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/notes_api.py b/generated/groundlight_openapi_client/api/notes_api.py index d5a842d1..f1af2cb5 100644 --- a/generated/groundlight_openapi_client/api/notes_api.py +++ b/generated/groundlight_openapi_client/api/notes_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.all_notes import AllNotes from groundlight_openapi_client.model.note_request import NoteRequest @@ -39,118 +38,89 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_note_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/notes', - 'operation_id': 'create_note', - 'http_method': 'POST', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/notes", + "operation_id": "create_note", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'note_request', - ], - 'required': [ - 'detector_id', - ], - 'nullable': [ + "all": [ + "detector_id", + "note_request", ], - 'enum': [ + "required": [ + "detector_id", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "note_request": (NoteRequest,), }, - 'allowed_values': { + "attribute_map": { + "detector_id": "detector_id", }, - 'openapi_types': { - 'detector_id': - (str,), - 'note_request': - (NoteRequest,), + "location_map": { + "detector_id": "query", + "note_request": "body", }, - 'attribute_map': { - 'detector_id': 'detector_id', - }, - 'location_map': { - 'detector_id': 'query', - 'note_request': 'body', - }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [], - 'content_type': [ - 'application/json', - 'application/x-www-form-urlencoded', - 'multipart/form-data' - ] + "accept": [], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], }, - api_client=api_client + api_client=api_client, ) self.get_notes_endpoint = _Endpoint( settings={ - 'response_type': (AllNotes,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/notes', - 'operation_id': 'get_notes', - 'http_method': 'GET', - 'servers': None, + "response_type": (AllNotes,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/notes", + "operation_id": "get_notes", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', + "all": [ + "detector_id", ], - 'required': [ - 'detector_id', + "required": [ + "detector_id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_id': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), }, - 'attribute_map': { - 'detector_id': 'detector_id', + "attribute_map": { + "detector_id": "detector_id", }, - 'location_map': { - 'detector_id': 'query', + "location_map": { + "detector_id": "query", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def create_note( - self, - detector_id, - **kwargs - ): + def create_note(self, detector_id, **kwargs): """create_note # noqa: E501 Creates a new note. # noqa: E501 @@ -197,39 +167,19 @@ def create_note( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.create_note_endpoint.call_with_http_info(**kwargs) - def get_notes( - self, - detector_id, - **kwargs - ): + def get_notes(self, detector_id, **kwargs): """get_notes # noqa: E501 Retrieves all notes from a given detector and returns them in lists, one for each note_category. # noqa: E501 @@ -275,31 +225,14 @@ def get_notes( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['detector_id'] = \ - detector_id + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") + kwargs["detector_id"] = detector_id return self.get_notes_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api/user_api.py b/generated/groundlight_openapi_client/api/user_api.py index d3b268d0..a14200f2 100644 --- a/generated/groundlight_openapi_client/api/user_api.py +++ b/generated/groundlight_openapi_client/api/user_api.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -20,7 +19,7 @@ datetime, file_type, none_type, - validate_and_convert_types + validate_and_convert_types, ) from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 @@ -38,53 +37,30 @@ def __init__(self, api_client=None): self.api_client = api_client self.who_am_i_endpoint = _Endpoint( settings={ - 'response_type': (InlineResponse2002,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/me', - 'operation_id': 'who_am_i', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "response_type": (InlineResponse2002,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/me", + "operation_id": "who_am_i", + "http_method": "GET", + "servers": None, }, + params_map={"all": [], "required": [], "nullable": [], "enum": [], "validation": []}, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": {}, + "attribute_map": {}, + "location_map": {}, + "collection_format_map": {}, }, headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) - def who_am_i( - self, - **kwargs - ): + def who_am_i(self, **kwargs): """who_am_i # noqa: E501 Retrieve the current user. # noqa: E501 @@ -128,29 +104,13 @@ def who_am_i( If the method is called asynchronously, returns the request thread. """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') + kwargs["async_req"] = kwargs.get("async_req", False) + kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True) + kwargs["_preload_content"] = kwargs.get("_preload_content", True) + kwargs["_request_timeout"] = kwargs.get("_request_timeout", None) + kwargs["_check_input_type"] = kwargs.get("_check_input_type", True) + kwargs["_check_return_type"] = kwargs.get("_check_return_type", True) + kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False) + kwargs["_content_type"] = kwargs.get("_content_type") + kwargs["_host_index"] = kwargs.get("_host_index") return self.who_am_i_endpoint.call_with_http_info(**kwargs) - diff --git a/generated/groundlight_openapi_client/api_client.py b/generated/groundlight_openapi_client/api_client.py index e18e15fa..da2e348a 100644 --- a/generated/groundlight_openapi_client/api_client.py +++ b/generated/groundlight_openapi_client/api_client.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import json import atexit import mimetypes @@ -36,7 +35,7 @@ file_type, model_to_dict, none_type, - validate_and_convert_types + validate_and_convert_types, ) @@ -64,8 +63,7 @@ class ApiClient(object): _pool = None - def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None, pool_threads=1): + def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=1): if configuration is None: configuration = Configuration.get_default_copy() self.configuration = configuration @@ -77,7 +75,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' + self.user_agent = "OpenAPI-Generator/1.0.0/python" def __enter__(self): return self @@ -90,13 +88,13 @@ def close(self): self._pool.close() self._pool.join() self._pool = None - if hasattr(atexit, 'unregister'): + if hasattr(atexit, "unregister"): atexit.unregister(self.close) @property def pool(self): """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. + avoids instantiating unused threadpool for blocking clients. """ if self._pool is None: atexit.register(self.close) @@ -106,11 +104,11 @@ def pool(self): @property def user_agent(self): """User agent for this API client""" - return self.default_headers['User-Agent'] + return self.default_headers["User-Agent"] @user_agent.setter def user_agent(self, value): - self.default_headers['User-Agent'] = value + self.default_headers["User-Agent"] = value def set_default_header(self, header_name, header_value): self.default_headers[header_name] = header_value @@ -133,7 +131,7 @@ def __call_api( _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, _check_type: typing.Optional[bool] = None, - _content_type: typing.Optional[str] = None + _content_type: typing.Optional[str] = None, ): config = self.configuration @@ -142,48 +140,39 @@ def __call_api( header_params = header_params or {} header_params.update(self.default_headers) if self.cookie: - header_params['Cookie'] = self.cookie + header_params["Cookie"] = self.cookie if header_params: header_params = self.sanitize_for_serialization(header_params) - header_params = dict(self.parameters_to_tuples(header_params, - collection_formats)) + header_params = dict(self.parameters_to_tuples(header_params, collection_formats)) # 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), safe=config.safe_chars_for_path_param) - ) + resource_path = resource_path.replace("{%s}" % k, quote(str(v), safe=config.safe_chars_for_path_param)) # query parameters if query_params: query_params = self.sanitize_for_serialization(query_params) - query_params = self.parameters_to_tuples(query_params, - collection_formats) + query_params = self.parameters_to_tuples(query_params, collection_formats) # 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)) - if header_params['Content-Type'].startswith("multipart"): - post_params = self.parameters_to_multipart(post_params, - (dict) ) + if header_params["Content-Type"].startswith("multipart"): + post_params = self.parameters_to_multipart(post_params, (dict)) # body if body: body = self.sanitize_for_serialization(body) # auth setting - self.update_params_for_auth(header_params, query_params, - auth_settings, resource_path, method, body) + self.update_params_for_auth(header_params, query_params, auth_settings, resource_path, method, body) # request url if _host is None: @@ -195,12 +184,17 @@ def __call_api( try: # perform request and return response response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, + method, + url, + query_params=query_params, + headers=header_params, + post_params=post_params, + body=body, _preload_content=_preload_content, - _request_timeout=_request_timeout) + _request_timeout=_request_timeout, + ) except ApiException as e: - e.body = e.body.decode('utf-8') + e.body = e.body.decode("utf-8") raise e self.last_response = response_data @@ -208,33 +202,28 @@ def __call_api( return_data = response_data if not _preload_content: - return (return_data) + return return_data return return_data # deserialize response data if response_type: if response_type != (file_type,): encoding = "utf-8" - 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) if match: encoding = match.group(1) response_data.data = response_data.data.decode(encoding) - return_data = self.deserialize( - response_data, - response_type, - _check_type - ) + return_data = self.deserialize(response_data, response_type, _check_type) else: return_data = None if _return_http_data_only: - return (return_data) + return return_data else: - return (return_data, response_data.status, - response_data.getheaders()) + return (return_data, response_data.status, response_data.getheaders()) def parameters_to_multipart(self, params, collection_types): """Get parameters as list of tuples, formatting as json if value is collection_types @@ -245,15 +234,15 @@ def parameters_to_multipart(self, params, collection_types): """ new_params = [] if collection_types is None: - collection_types = (dict) + collection_types = dict for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 - if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json - v = json.dumps(v, ensure_ascii=False).encode("utf-8") - field = RequestField(k, v) - field.make_multipart(content_type="application/json; charset=utf-8") - new_params.append(field) + if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json + v = json.dumps(v, ensure_ascii=False).encode("utf-8") + field = RequestField(k, v) + field.make_multipart(content_type="application/json; charset=utf-8") + new_params.append(field) else: - new_params.append((k, v)) + new_params.append((k, v)) return new_params @classmethod @@ -271,9 +260,7 @@ def sanitize_for_serialization(cls, obj): :return: The serialized form of data. """ if isinstance(obj, (ModelNormal, ModelComposed)): - return { - key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items() - } + return {key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()} elif isinstance(obj, io.IOBase): return cls.get_file_data_and_close_file(obj) elif isinstance(obj, (str, int, float, none_type, bool)): @@ -286,7 +273,7 @@ def sanitize_for_serialization(cls, obj): return [cls.sanitize_for_serialization(item) for item in obj] if isinstance(obj, dict): return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()} - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) + raise ApiValueError("Unable to prepare type {} for serialization".format(obj.__class__.__name__)) def deserialize(self, response, response_type, _check_type): """Deserializes response into an object. @@ -312,8 +299,7 @@ def deserialize(self, response, response_type, _check_type): # save response body into a tmp file and return the instance if response_type == (file_type,): content_disposition = response.getheader("Content-Disposition") - return deserialize_file(response.data, self.configuration, - content_disposition=content_disposition) + return deserialize_file(response.data, self.configuration, content_disposition=content_disposition) # fetch data from response object try: @@ -324,12 +310,7 @@ def deserialize(self, response, response_type, _check_type): # store our data under the key of 'received_data' so users have some # context if they are deserializing a string and the data type is wrong deserialized_data = validate_and_convert_types( - received_data, - response_type, - ['received_data'], - True, - _check_type, - configuration=self.configuration + received_data, response_type, ["received_data"], True, _check_type, configuration=self.configuration ) return deserialized_data @@ -351,7 +332,7 @@ def call_api( _preload_content: bool = True, _request_timeout: typing.Optional[typing.Union[int, float, typing.Tuple]] = None, _host: typing.Optional[str] = None, - _check_type: typing.Optional[bool] = None + _check_type: typing.Optional[bool] = None, ): """Makes the HTTP request (synchronous) and returns deserialized data. @@ -407,87 +388,126 @@ def call_api( then the method will return the response directly. """ if not async_req: - return self.__call_api(resource_path, method, - path_params, query_params, header_params, - body, post_params, files, - response_type, auth_settings, - _return_http_data_only, collection_formats, - _preload_content, _request_timeout, _host, - _check_type) - - return self.pool.apply_async(self.__call_api, (resource_path, - method, path_params, - query_params, - header_params, body, - post_params, files, - response_type, - auth_settings, - _return_http_data_only, - collection_formats, - _preload_content, - _request_timeout, - _host, _check_type)) - - def request(self, method, url, query_params=None, headers=None, - post_params=None, body=None, _preload_content=True, - _request_timeout=None): + return self.__call_api( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _check_type, + ) + + return self.pool.apply_async( + self.__call_api, + ( + resource_path, + method, + path_params, + query_params, + header_params, + body, + post_params, + files, + response_type, + auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, + _request_timeout, + _host, + _check_type, + ), + ) + + def request( + self, + method, + url, + query_params=None, + headers=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): """Makes the HTTP request using RESTClient.""" if method == "GET": - return self.rest_client.GET(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) + return self.rest_client.GET( + url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers, + ) elif method == "HEAD": - return self.rest_client.HEAD(url, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - headers=headers) + return self.rest_client.HEAD( + url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers, + ) elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.OPTIONS( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "POST": - return self.rest_client.POST(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.POST( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "PUT": - return self.rest_client.PUT(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.PUT( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "PATCH": - return self.rest_client.PATCH(url, - query_params=query_params, - headers=headers, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + return self.rest_client.PATCH( + url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) elif method == "DELETE": - return self.rest_client.DELETE(url, - query_params=query_params, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." + return self.rest_client.DELETE( + url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, ) + else: + raise ApiValueError("http method must be `GET`, `HEAD`, `OPTIONS`, `POST`, `PATCH`, `PUT` or `DELETE`.") def parameters_to_tuples(self, params, collection_formats): """Get parameters as list of tuples, formatting collections. @@ -502,19 +522,18 @@ def parameters_to_tuples(self, params, collection_formats): for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501 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 @@ -546,15 +565,12 @@ def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[i continue if file_instance.closed is True: raise ApiValueError( - "Cannot read a closed file. The passed in file_type " - "for %s must be open." % param_name + "Cannot read a closed file. The passed in file_type for %s must be open." % param_name ) filename = os.path.basename(file_instance.name) filedata = self.get_file_data_and_close_file(file_instance) - mimetype = (mimetypes.guess_type(filename)[0] or - 'application/octet-stream') - params.append( - tuple([param_name, tuple([filename, filedata, mimetype])])) + mimetype = mimetypes.guess_type(filename)[0] or "application/octet-stream" + params.append(tuple([param_name, tuple([filename, filedata, mimetype])])) return params @@ -569,10 +585,10 @@ def select_header_accept(self, accepts): accepts = [x.lower() for x in accepts] - if 'application/json' in accepts: - return 'application/json' + if "application/json" in accepts: + return "application/json" else: - return ', '.join(accepts) + return ", ".join(accepts) def select_header_content_type(self, content_types, method=None, body=None): """Returns `Content-Type` based on an array of content_types provided. @@ -583,22 +599,19 @@ def select_header_content_type(self, content_types, method=None, body=None): :return: Content-Type (e.g. application/json). """ if not content_types: - return 'application/json' + return "application/json" content_types = [x.lower() for x in content_types] - if (method == 'PATCH' and - 'application/json-patch+json' in content_types and - isinstance(body, list)): - return 'application/json-patch+json' + if method == "PATCH" and "application/json-patch+json" in content_types and isinstance(body, list): + return "application/json-patch+json" - if 'application/json' in content_types or '*/*' in content_types: - return 'application/json' + if "application/json" in content_types or "*/*" in content_types: + return "application/json" else: return content_types[0] - def update_params_for_auth(self, headers, queries, auth_settings, - resource_path, method, body): + def update_params_for_auth(self, headers, queries, auth_settings, resource_path, method, body): """Updates header and query params based on authentication setting. :param headers: Header parameters dict to be updated. @@ -615,22 +628,19 @@ def update_params_for_auth(self, headers, queries, auth_settings, for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if auth_setting['in'] == 'cookie': - headers['Cookie'] = auth_setting['value'] - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) + if auth_setting["in"] == "cookie": + headers["Cookie"] = auth_setting["value"] + elif auth_setting["in"] == "header": + if auth_setting["type"] != "http-signature": + headers[auth_setting["key"]] = auth_setting["value"] + elif auth_setting["in"] == "query": + queries.append((auth_setting["key"], auth_setting["value"])) else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) + raise ApiValueError("Authentication token must be in `query` or `header`") class Endpoint(object): - def __init__(self, settings=None, params_map=None, root_map=None, - headers_map=None, api_client=None, callable=None): + def __init__(self, settings=None, params_map=None, root_map=None, headers_map=None, api_client=None, callable=None): """Creates an endpoint Args: @@ -666,59 +676,52 @@ def __init__(self, settings=None, params_map=None, root_map=None, """ self.settings = settings self.params_map = params_map - self.params_map['all'].extend([ - 'async_req', - '_host_index', - '_preload_content', - '_request_timeout', - '_return_http_data_only', - '_check_input_type', - '_check_return_type', - '_content_type', - '_spec_property_naming' + self.params_map["all"].extend([ + "async_req", + "_host_index", + "_preload_content", + "_request_timeout", + "_return_http_data_only", + "_check_input_type", + "_check_return_type", + "_content_type", + "_spec_property_naming", ]) - self.params_map['nullable'].extend(['_request_timeout']) - self.validations = root_map['validations'] - self.allowed_values = root_map['allowed_values'] - self.openapi_types = root_map['openapi_types'] + self.params_map["nullable"].extend(["_request_timeout"]) + self.validations = root_map["validations"] + self.allowed_values = root_map["allowed_values"] + self.openapi_types = root_map["openapi_types"] extra_types = { - 'async_req': (bool,), - '_host_index': (none_type, int), - '_preload_content': (bool,), - '_request_timeout': (none_type, float, (float,), [float], int, (int,), [int]), - '_return_http_data_only': (bool,), - '_check_input_type': (bool,), - '_check_return_type': (bool,), - '_spec_property_naming': (bool,), - '_content_type': (none_type, str) + "async_req": (bool,), + "_host_index": (none_type, int), + "_preload_content": (bool,), + "_request_timeout": (none_type, float, (float,), [float], int, (int,), [int]), + "_return_http_data_only": (bool,), + "_check_input_type": (bool,), + "_check_return_type": (bool,), + "_spec_property_naming": (bool,), + "_content_type": (none_type, str), } self.openapi_types.update(extra_types) - self.attribute_map = root_map['attribute_map'] - self.location_map = root_map['location_map'] - self.collection_format_map = root_map['collection_format_map'] + self.attribute_map = root_map["attribute_map"] + self.location_map = root_map["location_map"] + self.collection_format_map = root_map["collection_format_map"] self.headers_map = headers_map self.api_client = api_client self.callable = callable def __validate_inputs(self, kwargs): - for param in self.params_map['enum']: + for param in self.params_map["enum"]: if param in kwargs: - check_allowed_values( - self.allowed_values, - (param,), - kwargs[param] - ) + check_allowed_values(self.allowed_values, (param,), kwargs[param]) - for param in self.params_map['validation']: + for param in self.params_map["validation"]: if param in kwargs: check_validations( - self.validations, - (param,), - kwargs[param], - configuration=self.api_client.configuration + self.validations, (param,), kwargs[param], configuration=self.api_client.configuration ) - if kwargs['_check_input_type'] is False: + if kwargs["_check_input_type"] is False: return for key, value in kwargs.items(): @@ -726,52 +729,42 @@ def __validate_inputs(self, kwargs): value, self.openapi_types[key], [key], - kwargs['_spec_property_naming'], - kwargs['_check_input_type'], - configuration=self.api_client.configuration + kwargs["_spec_property_naming"], + kwargs["_check_input_type"], + configuration=self.api_client.configuration, ) kwargs[key] = fixed_val def __gather_params(self, kwargs): - params = { - 'body': None, - 'collection_format': {}, - 'file': {}, - 'form': [], - 'header': {}, - 'path': {}, - 'query': [] - } + params = {"body": None, "collection_format": {}, "file": {}, "form": [], "header": {}, "path": {}, "query": []} for param_name, param_value in kwargs.items(): param_location = self.location_map.get(param_name) if param_location is None: continue if param_location: - if param_location == 'body': - params['body'] = param_value + if param_location == "body": + params["body"] = param_value continue base_name = self.attribute_map[param_name] - if (param_location == 'form' and - self.openapi_types[param_name] == (file_type,)): - params['file'][base_name] = [param_value] - elif (param_location == 'form' and - self.openapi_types[param_name] == ([file_type],)): + if param_location == "form" and self.openapi_types[param_name] == (file_type,): + params["file"][base_name] = [param_value] + elif param_location == "form" and self.openapi_types[param_name] == ([file_type],): # param_value is already a list - params['file'][base_name] = param_value - elif param_location in {'form', 'query'}: + params["file"][base_name] = param_value + elif param_location in {"form", "query"}: param_value_full = (base_name, param_value) params[param_location].append(param_value_full) - if param_location not in {'form', 'query'}: + if param_location not in {"form", "query"}: params[param_location][base_name] = param_value collection_format = self.collection_format_map.get(param_name) if collection_format: - params['collection_format'][base_name] = collection_format + params["collection_format"][base_name] = collection_format return params def __call__(self, *args, **kwargs): - """ This method is invoked when endpoints are called + """This method is invoked when endpoints are called Example: api_instance = ActionsApi() @@ -786,82 +779,79 @@ def __call__(self, *args, **kwargs): def call_with_http_info(self, **kwargs): try: - index = self.api_client.configuration.server_operation_index.get( - self.settings['operation_id'], self.api_client.configuration.server_index - ) if kwargs['_host_index'] is None else kwargs['_host_index'] + index = ( + self.api_client.configuration.server_operation_index.get( + self.settings["operation_id"], self.api_client.configuration.server_index + ) + if kwargs["_host_index"] is None + else kwargs["_host_index"] + ) server_variables = self.api_client.configuration.server_operation_variables.get( - self.settings['operation_id'], self.api_client.configuration.server_variables + self.settings["operation_id"], self.api_client.configuration.server_variables ) _host = self.api_client.configuration.get_host_from_settings( - index, variables=server_variables, servers=self.settings['servers'] + index, variables=server_variables, servers=self.settings["servers"] ) except IndexError: - if self.settings['servers']: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(self.settings['servers']) - ) + if self.settings["servers"]: + raise ApiValueError("Invalid host index. Must be 0 <= index < %s" % len(self.settings["servers"])) _host = None for key, value in kwargs.items(): - if key not in self.params_map['all']: + if key not in self.params_map["all"]: raise ApiTypeError( - "Got an unexpected parameter '%s'" - " to method `%s`" % - (key, self.settings['operation_id']) + "Got an unexpected parameter '%s' to method `%s`" % (key, self.settings["operation_id"]) ) # only throw this nullable ApiValueError if _check_input_type # is False, if _check_input_type==True we catch this case # in self.__validate_inputs - if (key not in self.params_map['nullable'] and value is None - and kwargs['_check_input_type'] is False): + if key not in self.params_map["nullable"] and value is None and kwargs["_check_input_type"] is False: raise ApiValueError( - "Value may not be None for non-nullable parameter `%s`" - " when calling `%s`" % - (key, self.settings['operation_id']) + "Value may not be None for non-nullable parameter `%s` when calling `%s`" + % (key, self.settings["operation_id"]) ) - for key in self.params_map['required']: + for key in self.params_map["required"]: if key not in kwargs.keys(): raise ApiValueError( - "Missing the required parameter `%s` when calling " - "`%s`" % (key, self.settings['operation_id']) + "Missing the required parameter `%s` when calling `%s`" % (key, self.settings["operation_id"]) ) self.__validate_inputs(kwargs) params = self.__gather_params(kwargs) - accept_headers_list = self.headers_map['accept'] + accept_headers_list = self.headers_map["accept"] if accept_headers_list: - params['header']['Accept'] = self.api_client.select_header_accept( - accept_headers_list) + params["header"]["Accept"] = self.api_client.select_header_accept(accept_headers_list) - if kwargs.get('_content_type'): - params['header']['Content-Type'] = kwargs['_content_type'] + if kwargs.get("_content_type"): + params["header"]["Content-Type"] = kwargs["_content_type"] else: - content_type_headers_list = self.headers_map['content_type'] + content_type_headers_list = self.headers_map["content_type"] if content_type_headers_list: - if params['body'] != "": + if params["body"] != "": header_list = self.api_client.select_header_content_type( - content_type_headers_list, self.settings['http_method'], - params['body']) - params['header']['Content-Type'] = header_list + content_type_headers_list, self.settings["http_method"], params["body"] + ) + params["header"]["Content-Type"] = header_list return self.api_client.call_api( - self.settings['endpoint_path'], self.settings['http_method'], - params['path'], - params['query'], - params['header'], - body=params['body'], - post_params=params['form'], - files=params['file'], - response_type=self.settings['response_type'], - auth_settings=self.settings['auth'], - async_req=kwargs['async_req'], - _check_type=kwargs['_check_return_type'], - _return_http_data_only=kwargs['_return_http_data_only'], - _preload_content=kwargs['_preload_content'], - _request_timeout=kwargs['_request_timeout'], + self.settings["endpoint_path"], + self.settings["http_method"], + params["path"], + params["query"], + params["header"], + body=params["body"], + post_params=params["form"], + files=params["file"], + response_type=self.settings["response_type"], + auth_settings=self.settings["auth"], + async_req=kwargs["async_req"], + _check_type=kwargs["_check_return_type"], + _return_http_data_only=kwargs["_return_http_data_only"], + _preload_content=kwargs["_preload_content"], + _request_timeout=kwargs["_request_timeout"], _host=_host, - collection_formats=params['collection_format']) + collection_formats=params["collection_format"], + ) diff --git a/generated/groundlight_openapi_client/apis/__init__.py b/generated/groundlight_openapi_client/apis/__init__.py index dc144e2b..1da138d1 100644 --- a/generated/groundlight_openapi_client/apis/__init__.py +++ b/generated/groundlight_openapi_client/apis/__init__.py @@ -1,4 +1,3 @@ - # flake8: noqa # Import all APIs into this package. diff --git a/generated/groundlight_openapi_client/configuration.py b/generated/groundlight_openapi_client/configuration.py index ac1146ca..654b832f 100644 --- a/generated/groundlight_openapi_client/configuration.py +++ b/generated/groundlight_openapi_client/configuration.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import copy import logging import multiprocessing @@ -20,99 +19,112 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' + "multipleOf", + "maximum", + "exclusiveMaximum", + "minimum", + "exclusiveMinimum", + "maxLength", + "minLength", + "pattern", + "maxItems", + "minItems", } + class Configuration(object): """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = groundlight_openapi_client.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 + Ref: https://openapi-generator.tech + Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + :param disabled_client_side_validations (string): Comma-separated list of + JSON schema validation keywords to disable JSON schema structural validation + rules. The following keywords may be specified: multipleOf, maximum, + exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, + maxItems, minItems. + By default, the validation is performed for data generated locally by the client + and data received from the server, independent of any validation performed by + the server side. If the input data does not satisfy the JSON schema validation + rules specified in the OpenAPI document, an exception is raised. + If disabled_client_side_validations is set, structural validation is + disabled. This can be useful to troubleshoot data validation problem, such as + when the OpenAPI document validation rules do not match the actual API data + received by the server. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum values before. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format + + :Example: + + API Key Authentication Example. + Given the following security scheme in the OpenAPI specification: + components: + securitySchemes: + cookieAuth: # name for the security scheme + type: apiKey + in: cookie + name: JSESSIONID # cookie name + + You can programmatically set the cookie: + + conf = groundlight_openapi_client.Configuration( + api_key={'cookieAuth': 'abc123'} + api_key_prefix={'cookieAuth': 'JSESSIONID'} + ) + + The following cookie will be added to the HTTP request: + Cookie: JSESSIONID abc123 """ _default = None - def __init__(self, host=None, - api_key=None, api_key_prefix=None, - access_token=None, - username=None, password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, server_variables=None, - server_operation_index=None, server_operation_variables=None, - ssl_ca_cert=None, - ): - """Constructor - """ + def __init__( + self, + host=None, + api_key=None, + api_key_prefix=None, + access_token=None, + username=None, + password=None, + discard_unknown_keys=False, + disabled_client_side_validations="", + server_index=None, + server_variables=None, + server_operation_index=None, + server_operation_variables=None, + ssl_ca_cert=None, + ): + """Constructor""" self._base_path = "https://api.groundlight.ai/device-api" if host is None else host """Default Base url """ @@ -155,7 +167,7 @@ def __init__(self, host=None, """ self.logger["package_logger"] = logging.getLogger("groundlight_openapi_client") self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' + self.logger_format = "%(asctime)s %(levelname)s %(message)s" """Log format """ self.logger_stream_handler = None @@ -206,7 +218,7 @@ def __init__(self, host=None, self.proxy_headers = None """Proxy headers """ - self.safe_chars_for_path_param = '' + self.safe_chars_for_path_param = "" """Safe chars for path_param """ self.retries = None @@ -223,7 +235,7 @@ def __deepcopy__(self, memo): result = cls.__new__(cls) memo[id(self)] = result for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): + if k not in ("logger", "logger_file_handler"): setattr(result, k, copy.deepcopy(v, memo)) # shallow copy of loggers result.logger = copy.copy(self.logger) @@ -234,12 +246,11 @@ def __deepcopy__(self, memo): def __setattr__(self, name, value): object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) + if name == "disabled_client_side_validations": + s = set(filter(None, value.split(","))) for v in s: if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) + raise ApiValueError("Invalid keyword: '{0}''".format(v)) self._disabled_client_side_validations = s @classmethod @@ -380,9 +391,7 @@ def get_basic_auth_token(self): password = "" if self.password is not None: password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') + return urllib3.util.make_headers(basic_auth=username + ":" + password).get("authorization") def auth_settings(self): """Gets Auth Settings dict for api client. @@ -390,13 +399,13 @@ def auth_settings(self): :return: The Auth Settings information dict. """ auth = {} - if 'ApiToken' in self.api_key: - auth['ApiToken'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'x-api-token', - 'value': self.get_api_key_with_prefix( - 'ApiToken', + if "ApiToken" in self.api_key: + auth["ApiToken"] = { + "type": "api_key", + "in": "header", + "key": "x-api-token", + "value": self.get_api_key_with_prefix( + "ApiToken", ), } return auth @@ -406,12 +415,13 @@ def to_debug_report(self): :return: The report for debugging. """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.18.2\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) + return ( + "Python SDK Debug Report:\n" + "OS: {env}\n" + "Python Version: {pyversion}\n" + "Version of the API: 0.18.2\n" + "SDK Package Version: 1.0.0".format(env=sys.platform, pyversion=sys.version) + ) def get_host_settings(self): """Gets an array of host settings @@ -420,21 +430,21 @@ def get_host_settings(self): """ return [ { - 'url': "https://api.groundlight.ai/device-api", - 'description': "Prod", + "url": "https://api.groundlight.ai/device-api", + "description": "Prod", }, { - 'url': "https://api.integ.groundlight.ai/device-api", - 'description': "Integ", + "url": "https://api.integ.groundlight.ai/device-api", + "description": "Integ", }, { - 'url': "https://device.positronix.ai/device-api", - 'description': "Device Prod", + "url": "https://device.positronix.ai/device-api", + "description": "Device Prod", }, { - 'url': "https://device.integ.positronix.ai/device-api", - 'description': "Device Integ", - } + "url": "https://device.integ.positronix.ai/device-api", + "description": "Device Integ", + }, ] def get_host_from_settings(self, index, variables=None, servers=None): @@ -454,23 +464,21 @@ def get_host_from_settings(self, index, variables=None, servers=None): server = servers[index] except IndexError: raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) + "Invalid index {0} when selecting the host settings. Must be less than {1}".format(index, len(servers)) + ) - url = server['url'] + url = server["url"] # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) + for variable_name, variable in server.get("variables", {}).items(): + used_value = variables.get(variable_name, variable["default_value"]) - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: + if "enum_values" in variable and used_value not in variable["enum_values"]: raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) + "The variable `{0}` in the host URL has invalid value {1}. Must be {2}.".format( + variable_name, variables[variable_name], variable["enum_values"] + ) + ) url = url.replace("{" + variable_name + "}", used_value) diff --git a/generated/groundlight_openapi_client/exceptions.py b/generated/groundlight_openapi_client/exceptions.py index 5cb07d28..393dbba8 100644 --- a/generated/groundlight_openapi_client/exceptions.py +++ b/generated/groundlight_openapi_client/exceptions.py @@ -9,15 +9,13 @@ """ - class OpenApiException(Exception): """The base exception class for all OpenAPIExceptions""" class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors + def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): + """Raises an exception for TypeErrors Args: msg (str): the exception message @@ -98,7 +96,6 @@ def __init__(self, msg, path_to_item=None): class ApiException(OpenApiException): - def __init__(self, status=None, reason=None, http_resp=None): if http_resp: self.status = http_resp.status @@ -113,11 +110,9 @@ def __init__(self, status=None, reason=None, http_resp=None): def __str__(self): """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) + error_message = "({0})\nReason: {1}\n".format(self.status, self.reason) if self.headers: - error_message += "HTTP response headers: {0}\n".format( - 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) @@ -126,25 +121,21 @@ def __str__(self): class NotFoundException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super(NotFoundException, self).__init__(status, reason, http_resp) class UnauthorizedException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super(UnauthorizedException, self).__init__(status, reason, http_resp) class ForbiddenException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super(ForbiddenException, self).__init__(status, reason, http_resp) class ServiceException(ApiException): - def __init__(self, status=None, reason=None, http_resp=None): super(ServiceException, self).__init__(status, reason, http_resp) diff --git a/generated/groundlight_openapi_client/model/account_month_to_date_info.py b/generated/groundlight_openapi_client/model/account_month_to_date_info.py index ff8a5a91..98dd18e3 100644 --- a/generated/groundlight_openapi_client/model/account_month_to_date_info.py +++ b/generated/groundlight_openapi_client/model/account_month_to_date_info.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class AccountMonthToDateInfo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class AccountMonthToDateInfo(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,36 +88,45 @@ def openapi_types(): and the value is attribute type. """ return { - 'iqs': (int,), # noqa: E501 - 'escalations': (int,), # noqa: E501 - 'active_detectors': (int,), # noqa: E501 - 'iqs_limit': (int, none_type,), # noqa: E501 - 'escalations_limit': (int, none_type,), # noqa: E501 - 'active_detectors_limit': (int, none_type,), # noqa: E501 + "iqs": (int,), # noqa: E501 + "escalations": (int,), # noqa: E501 + "active_detectors": (int,), # noqa: E501 + "iqs_limit": ( + int, + none_type, + ), # noqa: E501 + "escalations_limit": ( + int, + none_type, + ), # noqa: E501 + "active_detectors_limit": ( + int, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'iqs': 'iqs', # noqa: E501 - 'escalations': 'escalations', # noqa: E501 - 'active_detectors': 'active_detectors', # noqa: E501 - 'iqs_limit': 'iqs_limit', # noqa: E501 - 'escalations_limit': 'escalations_limit', # noqa: E501 - 'active_detectors_limit': 'active_detectors_limit', # noqa: E501 + "iqs": "iqs", # noqa: E501 + "escalations": "escalations", # noqa: E501 + "active_detectors": "active_detectors", # noqa: E501 + "iqs_limit": "iqs_limit", # noqa: E501 + "escalations_limit": "escalations_limit", # noqa: E501 + "active_detectors_limit": "active_detectors_limit", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs + ): # noqa: E501 """AccountMonthToDateInfo - a model defined in OpenAPI Args: @@ -155,17 +170,18 @@ def _from_openapi_data(cls, iqs, escalations, active_detectors, iqs_limit, escal _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -187,26 +203,30 @@ def _from_openapi_data(cls, iqs, escalations, active_detectors, iqs_limit, escal self.escalations_limit = escalations_limit self.active_detectors_limit = active_detectors_limit for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args - def __init__(self, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs): # noqa: E501 + def __init__( + self, iqs, escalations, active_detectors, iqs_limit, escalations_limit, active_detectors_limit, *args, **kwargs + ): # noqa: E501 """AccountMonthToDateInfo - a model defined in OpenAPI Args: @@ -250,15 +270,16 @@ def __init__(self, iqs, escalations, active_detectors, iqs_limit, escalations_li _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -280,13 +301,17 @@ def __init__(self, iqs, escalations, active_detectors, iqs_limit, escalations_li self.escalations_limit = escalations_limit self.active_detectors_limit = active_detectors_limit for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/action.py b/generated/groundlight_openapi_client/model/action.py index 516ab4d9..8308d44b 100644 --- a/generated/groundlight_openapi_client/model/action.py +++ b/generated/groundlight_openapi_client/model/action.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.channel_enum import ChannelEnum - globals()['ChannelEnum'] = ChannelEnum + + globals()["ChannelEnum"] = ChannelEnum class Action(ModelNormal): @@ -59,11 +59,9 @@ class Action(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,24 +96,22 @@ def openapi_types(): """ lazy_import() return { - 'channel': (ChannelEnum,), # noqa: E501 - 'recipient': (str,), # noqa: E501 - 'include_image': (bool,), # noqa: E501 + "channel": (ChannelEnum,), # noqa: E501 + "recipient": (str,), # noqa: E501 + "include_image": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'channel': 'channel', # noqa: E501 - 'recipient': 'recipient', # noqa: E501 - 'include_image': 'include_image', # noqa: E501 + "channel": "channel", # noqa: E501 + "recipient": "recipient", # noqa: E501 + "include_image": "include_image", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -152,17 +158,18 @@ def _from_openapi_data(cls, channel, recipient, include_image, *args, **kwargs): _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -181,22 +188,24 @@ def _from_openapi_data(cls, channel, recipient, include_image, *args, **kwargs): self.recipient = recipient self.include_image = include_image for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -241,15 +250,16 @@ def __init__(self, channel, recipient, include_image, *args, **kwargs): # noqa: _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -268,13 +278,17 @@ def __init__(self, channel, recipient, include_image, *args, **kwargs): # noqa: self.recipient = recipient self.include_image = include_image for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/action_list.py b/generated/groundlight_openapi_client/model/action_list.py index 604f75ae..a38fae04 100644 --- a/generated/groundlight_openapi_client/model/action_list.py +++ b/generated/groundlight_openapi_client/model/action_list.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.action import Action - globals()['Action'] = Action + + globals()["Action"] = Action class ActionList(ModelSimple): @@ -55,11 +55,9 @@ class ActionList(ModelSimple): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} additional_properties_type = None @@ -77,14 +75,13 @@ def openapi_types(): """ lazy_import() return { - 'value': ([Action],), + "value": ([Action],), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -92,12 +89,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -143,10 +140,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -157,14 +154,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -181,7 +179,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -233,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -249,14 +248,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,7 +273,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/all_notes.py b/generated/groundlight_openapi_client/model/all_notes.py index 2e3cb921..89da5af1 100644 --- a/generated/groundlight_openapi_client/model/all_notes.py +++ b/generated/groundlight_openapi_client/model/all_notes.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.note import Note - globals()['Note'] = Note + + globals()["Note"] = Note class AllNotes(ModelNormal): @@ -59,11 +59,9 @@ class AllNotes(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,22 +96,20 @@ def openapi_types(): """ lazy_import() return { - 'customer': ([Note],), # noqa: E501 - 'gl': ([Note],), # noqa: E501 + "customer": ([Note],), # noqa: E501 + "gl": ([Note],), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'customer': 'CUSTOMER', # noqa: E501 - 'gl': 'GL', # noqa: E501 + "customer": "CUSTOMER", # noqa: E501 + "gl": "GL", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -149,17 +155,18 @@ def _from_openapi_data(cls, customer, gl, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -177,22 +184,24 @@ def _from_openapi_data(cls, customer, gl, *args, **kwargs): # noqa: E501 self.customer = customer self.gl = gl for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -236,15 +245,16 @@ def __init__(self, customer, gl, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -262,13 +272,17 @@ def __init__(self, customer, gl, *args, **kwargs): # noqa: E501 self.customer = customer self.gl = gl for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/annotations_requested_enum.py b/generated/groundlight_openapi_client/model/annotations_requested_enum.py index 5b9a80a4..1e1f6b8f 100644 --- a/generated/groundlight_openapi_client/model/annotations_requested_enum.py +++ b/generated/groundlight_openapi_client/model/annotations_requested_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class AnnotationsRequestedEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,14 +50,13 @@ class AnnotationsRequestedEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'BINARY_CLASSIFICATION': "BINARY_CLASSIFICATION", - 'BOUNDING_BOXES': "BOUNDING_BOXES", + ("value",): { + "BINARY_CLASSIFICATION": "BINARY_CLASSIFICATION", + "BOUNDING_BOXES": "BOUNDING_BOXES", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -76,14 +73,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -91,12 +87,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -142,10 +138,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -156,14 +152,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -180,7 +177,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -232,12 +230,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -248,14 +246,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -272,7 +271,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/b_box_geometry.py b/generated/groundlight_openapi_client/model/b_box_geometry.py index 1ad77b5d..2282dfd7 100644 --- a/generated/groundlight_openapi_client/model/b_box_geometry.py +++ b/generated/groundlight_openapi_client/model/b_box_geometry.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BBoxGeometry(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class BBoxGeometry(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,31 +88,30 @@ def openapi_types(): and the value is attribute type. """ return { - 'left': (float,), # noqa: E501 - 'top': (float,), # noqa: E501 - 'right': (float,), # noqa: E501 - 'bottom': (float,), # noqa: E501 - 'x': (float,), # noqa: E501 - 'y': (float,), # noqa: E501 + "left": (float,), # noqa: E501 + "top": (float,), # noqa: E501 + "right": (float,), # noqa: E501 + "bottom": (float,), # noqa: E501 + "x": (float,), # noqa: E501 + "y": (float,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'left': 'left', # noqa: E501 - 'top': 'top', # noqa: E501 - 'right': 'right', # noqa: E501 - 'bottom': 'bottom', # noqa: E501 - 'x': 'x', # noqa: E501 - 'y': 'y', # noqa: E501 + "left": "left", # noqa: E501 + "top": "top", # noqa: E501 + "right": "right", # noqa: E501 + "bottom": "bottom", # noqa: E501 + "x": "x", # noqa: E501 + "y": "y", # noqa: E501 } read_only_vars = { - 'x', # noqa: E501 - 'y', # noqa: E501 + "x", # noqa: E501 + "y", # noqa: E501 } _composed_schemas = {} @@ -157,17 +162,18 @@ def _from_openapi_data(cls, left, top, right, bottom, x, y, *args, **kwargs): # _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -189,22 +195,24 @@ def _from_openapi_data(cls, left, top, right, bottom, x, y, *args, **kwargs): # self.x = x self.y = y for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -249,15 +257,16 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -277,13 +286,17 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/b_box_geometry_request.py b/generated/groundlight_openapi_client/model/b_box_geometry_request.py index 9d591392..fcac579f 100644 --- a/generated/groundlight_openapi_client/model/b_box_geometry_request.py +++ b/generated/groundlight_openapi_client/model/b_box_geometry_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BBoxGeometryRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class BBoxGeometryRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,26 +88,24 @@ def openapi_types(): and the value is attribute type. """ return { - 'left': (float,), # noqa: E501 - 'top': (float,), # noqa: E501 - 'right': (float,), # noqa: E501 - 'bottom': (float,), # noqa: E501 + "left": (float,), # noqa: E501 + "top": (float,), # noqa: E501 + "right": (float,), # noqa: E501 + "bottom": (float,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'left': 'left', # noqa: E501 - 'top': 'top', # noqa: E501 - 'right': 'right', # noqa: E501 - 'bottom': 'bottom', # noqa: E501 + "left": "left", # noqa: E501 + "top": "top", # noqa: E501 + "right": "right", # noqa: E501 + "bottom": "bottom", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -149,17 +153,18 @@ def _from_openapi_data(cls, left, top, right, bottom, *args, **kwargs): # noqa: _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -179,22 +184,24 @@ def _from_openapi_data(cls, left, top, right, bottom, *args, **kwargs): # noqa: self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -240,15 +247,16 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -268,13 +276,17 @@ def __init__(self, left, top, right, bottom, *args, **kwargs): # noqa: E501 self.right = right self.bottom = bottom for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/binary_classification_result.py b/generated/groundlight_openapi_client/model/binary_classification_result.py index 31ed8ba4..018a6f3e 100644 --- a/generated/groundlight_openapi_client/model/binary_classification_result.py +++ b/generated/groundlight_openapi_client/model/binary_classification_result.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BinaryClassificationResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,15 +54,15 @@ class BinaryClassificationResult(ModelNormal): """ allowed_values = { - ('result_type',): { - 'BINARY_CLASSIFICATION': "binary_classification", + ("result_type",): { + "BINARY_CLASSIFICATION": "binary_classification", }, } validations = { - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -74,7 +72,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -89,28 +97,29 @@ def openapi_types(): and the value is attribute type. """ return { - 'label': (str,), # noqa: E501 - 'confidence': (float, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'result_type': (str,), # noqa: E501 - 'from_edge': (bool,), # noqa: E501 + "label": (str,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'source': 'source', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'from_edge': 'from_edge', # noqa: E501 + "label": "label", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -159,17 +168,18 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -186,22 +196,24 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -248,15 +260,16 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,13 +286,17 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/blank_enum.py b/generated/groundlight_openapi_client/model/blank_enum.py index 86d08e37..aa466bb8 100644 --- a/generated/groundlight_openapi_client/model/blank_enum.py +++ b/generated/groundlight_openapi_client/model/blank_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BlankEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,13 +50,12 @@ class BlankEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'EMPTY': "", + ("value",): { + "EMPTY": "", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -75,14 +72,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -90,12 +86,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -141,24 +137,25 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -175,7 +172,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -227,26 +225,27 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,7 +262,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/bounding_box_label_enum.py b/generated/groundlight_openapi_client/model/bounding_box_label_enum.py index 8a243593..ed756ae4 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_label_enum.py +++ b/generated/groundlight_openapi_client/model/bounding_box_label_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BoundingBoxLabelEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,16 +50,15 @@ class BoundingBoxLabelEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'NO_OBJECTS': "NO_OBJECTS", - 'BOUNDING_BOX': "BOUNDING_BOX", - 'GREATER_THAN_MAX': "GREATER_THAN_MAX", - 'UNCLEAR': "UNCLEAR", + ("value",): { + "NO_OBJECTS": "NO_OBJECTS", + "BOUNDING_BOX": "BOUNDING_BOX", + "GREATER_THAN_MAX": "GREATER_THAN_MAX", + "UNCLEAR": "UNCLEAR", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -78,14 +75,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -93,12 +89,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -144,10 +140,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -158,14 +154,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,7 +179,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -234,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -250,14 +248,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -274,7 +273,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py index 1e0df799..bcf98f27 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BoundingBoxModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,13 +53,12 @@ class BoundingBoxModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('max_num_bboxes',): { - 'inclusive_maximum': 50, - 'inclusive_minimum': 1, + ("max_num_bboxes",): { + "inclusive_maximum": 50, + "inclusive_minimum": 1, }, } @@ -71,7 +68,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -86,22 +93,20 @@ def openapi_types(): and the value is attribute type. """ return { - 'class_name': (str,), # noqa: E501 - 'max_num_bboxes': (int,), # noqa: E501 + "class_name": (str,), # noqa: E501 + "max_num_bboxes": (int,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'class_name': 'class_name', # noqa: E501 - 'max_num_bboxes': 'max_num_bboxes', # noqa: E501 + "class_name": "class_name", # noqa: E501 + "max_num_bboxes": "max_num_bboxes", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -147,17 +152,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 max_num_bboxes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,22 +180,24 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -233,15 +241,16 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 max_num_bboxes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -258,13 +267,17 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/bounding_box_result.py b/generated/groundlight_openapi_client/model/bounding_box_result.py index 4cd54892..8fc4c417 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_result.py +++ b/generated/groundlight_openapi_client/model/bounding_box_result.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class BoundingBoxResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,15 +54,15 @@ class BoundingBoxResult(ModelNormal): """ allowed_values = { - ('result_type',): { - 'BOUNDING_BOX': "bounding_box", + ("result_type",): { + "BOUNDING_BOX": "bounding_box", }, } validations = { - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -74,7 +72,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -89,28 +97,29 @@ def openapi_types(): and the value is attribute type. """ return { - 'label': (str,), # noqa: E501 - 'confidence': (float, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'result_type': (str,), # noqa: E501 - 'from_edge': (bool,), # noqa: E501 + "label": (str,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'source': 'source', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'from_edge': 'from_edge', # noqa: E501 + "label": "label", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -159,17 +168,18 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -186,22 +196,24 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -248,15 +260,16 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,13 +286,17 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/channel_enum.py b/generated/groundlight_openapi_client/model/channel_enum.py index 9e6c4886..720dac0d 100644 --- a/generated/groundlight_openapi_client/model/channel_enum.py +++ b/generated/groundlight_openapi_client/model/channel_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class ChannelEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,14 +50,13 @@ class ChannelEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'TEXT': "TEXT", - 'EMAIL': "EMAIL", + ("value",): { + "TEXT": "TEXT", + "EMAIL": "EMAIL", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -76,14 +73,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -91,12 +87,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -142,10 +138,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -156,14 +152,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -180,7 +177,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -232,12 +230,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -248,14 +246,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -272,7 +271,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/condition.py b/generated/groundlight_openapi_client/model/condition.py index 48e6131f..65a2861f 100644 --- a/generated/groundlight_openapi_client/model/condition.py +++ b/generated/groundlight_openapi_client/model/condition.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class Condition(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class Condition(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,22 +88,20 @@ def openapi_types(): and the value is attribute type. """ return { - 'verb': (str,), # noqa: E501 - 'parameters': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "verb": (str,), # noqa: E501 + "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'verb': 'verb', # noqa: E501 - 'parameters': 'parameters', # noqa: E501 + "verb": "verb", # noqa: E501 + "parameters": "parameters", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -143,17 +147,18 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -171,22 +176,24 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -230,15 +237,16 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -256,13 +264,17 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/condition_request.py b/generated/groundlight_openapi_client/model/condition_request.py index c5326c64..674578a6 100644 --- a/generated/groundlight_openapi_client/model/condition_request.py +++ b/generated/groundlight_openapi_client/model/condition_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class ConditionRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class ConditionRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,22 +88,20 @@ def openapi_types(): and the value is attribute type. """ return { - 'verb': (str,), # noqa: E501 - 'parameters': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "verb": (str,), # noqa: E501 + "parameters": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'verb': 'verb', # noqa: E501 - 'parameters': 'parameters', # noqa: E501 + "verb": "verb", # noqa: E501 + "parameters": "parameters", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -143,17 +147,18 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -171,22 +176,24 @@ def _from_openapi_data(cls, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -230,15 +237,16 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -256,13 +264,17 @@ def __init__(self, verb, parameters, *args, **kwargs): # noqa: E501 self.verb = verb self.parameters = parameters for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/count_mode_configuration.py b/generated/groundlight_openapi_client/model/count_mode_configuration.py index 7603f76d..9c2d3be9 100644 --- a/generated/groundlight_openapi_client/model/count_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/count_mode_configuration.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class CountModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,13 +53,12 @@ class CountModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('max_count',): { - 'inclusive_maximum': 50, - 'inclusive_minimum': 1, + ("max_count",): { + "inclusive_maximum": 50, + "inclusive_minimum": 1, }, } @@ -71,7 +68,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -86,22 +93,20 @@ def openapi_types(): and the value is attribute type. """ return { - 'class_name': (str,), # noqa: E501 - 'max_count': (int,), # noqa: E501 + "class_name": (str,), # noqa: E501 + "max_count": (int,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'class_name': 'class_name', # noqa: E501 - 'max_count': 'max_count', # noqa: E501 + "class_name": "class_name", # noqa: E501 + "max_count": "max_count", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -147,17 +152,18 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 max_count (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,22 +180,24 @@ def _from_openapi_data(cls, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -233,15 +241,16 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 max_count (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -258,13 +267,17 @@ def __init__(self, class_name, *args, **kwargs): # noqa: E501 self.class_name = class_name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/counting_result.py b/generated/groundlight_openapi_client/model/counting_result.py index ebc34cdf..85e692e5 100644 --- a/generated/groundlight_openapi_client/model/counting_result.py +++ b/generated/groundlight_openapi_client/model/counting_result.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class CountingResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,18 +54,18 @@ class CountingResult(ModelNormal): """ allowed_values = { - ('result_type',): { - 'COUNTING': "counting", + ("result_type",): { + "COUNTING": "counting", }, } validations = { - ('count',): { - 'inclusive_minimum': 0, + ("count",): { + "inclusive_minimum": 0, }, - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -77,7 +75,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -92,30 +100,34 @@ def openapi_types(): and the value is attribute type. """ return { - 'count': (int, none_type,), # noqa: E501 - 'confidence': (float, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'result_type': (str,), # noqa: E501 - 'from_edge': (bool,), # noqa: E501 - 'greater_than_max': (bool,), # noqa: E501 + "count": ( + int, + none_type, + ), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 + "greater_than_max": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'count': 'count', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'source': 'source', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'from_edge': 'from_edge', # noqa: E501 - 'greater_than_max': 'greater_than_max', # noqa: E501 + "count": "count", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 + "greater_than_max": "greater_than_max", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -165,17 +177,18 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -192,22 +205,24 @@ def _from_openapi_data(cls, count, *args, **kwargs): # noqa: E501 self.count = count for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -255,15 +270,16 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 greater_than_max (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -280,13 +296,17 @@ def __init__(self, count, *args, **kwargs): # noqa: E501 self.count = count for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py index cb1f2bca..2cde7991 100644 --- a/generated/groundlight_openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -34,9 +33,10 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum from groundlight_openapi_client.model.status_enum import StatusEnum - globals()['BlankEnum'] = BlankEnum - globals()['DetectorTypeEnum'] = DetectorTypeEnum - globals()['StatusEnum'] = StatusEnum + + globals()["BlankEnum"] = BlankEnum + globals()["DetectorTypeEnum"] = DetectorTypeEnum + globals()["StatusEnum"] = StatusEnum class Detector(ModelNormal): @@ -63,20 +63,19 @@ class Detector(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 200, + ("name",): { + "max_length": 200, }, - ('confidence_threshold',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence_threshold",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, - ('patience_time',): { - 'inclusive_maximum': 3600, - 'inclusive_minimum': 0, + ("patience_time",): { + "inclusive_maximum": 3600, + "inclusive_minimum": 0, }, } @@ -87,7 +86,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -103,58 +112,85 @@ def openapi_types(): """ lazy_import() return { - 'id': (str,), # noqa: E501 - 'type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'query': (str,), # noqa: E501 - 'group_name': (str,), # noqa: E501 - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'mode': (str,), # noqa: E501 - 'mode_configuration': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'patience_time': (float,), # noqa: E501 - 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'escalation_type': (str,), # noqa: E501 + "id": (str,), # noqa: E501 + "type": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "name": (str,), # noqa: E501 + "query": (str,), # noqa: E501 + "group_name": (str,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "mode": (str,), # noqa: E501 + "mode_configuration": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "confidence_threshold": (float,), # noqa: E501 + "patience_time": (float,), # noqa: E501 + "status": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "escalation_type": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'name': 'name', # noqa: E501 - 'query': 'query', # noqa: E501 - 'group_name': 'group_name', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'mode': 'mode', # noqa: E501 - 'mode_configuration': 'mode_configuration', # noqa: E501 - 'confidence_threshold': 'confidence_threshold', # noqa: E501 - 'patience_time': 'patience_time', # noqa: E501 - 'status': 'status', # noqa: E501 - 'escalation_type': 'escalation_type', # noqa: E501 + "id": "id", # noqa: E501 + "type": "type", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "name": "name", # noqa: E501 + "query": "query", # noqa: E501 + "group_name": "group_name", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "mode": "mode", # noqa: E501 + "mode_configuration": "mode_configuration", # noqa: E501 + "confidence_threshold": "confidence_threshold", # noqa: E501 + "patience_time": "patience_time", # noqa: E501 + "status": "status", # noqa: E501 + "escalation_type": "escalation_type", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 - 'type', # noqa: E501 - 'created_at', # noqa: E501 - 'query', # noqa: E501 - 'group_name', # noqa: E501 - 'metadata', # noqa: E501 - 'mode', # noqa: E501 - 'mode_configuration', # noqa: E501 + "id", # noqa: E501 + "type", # noqa: E501 + "created_at", # noqa: E501 + "query", # noqa: E501 + "group_name", # noqa: E501 + "metadata", # noqa: E501 + "mode", # noqa: E501 + "mode_configuration", # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, type, created_at, name, query, group_name, metadata, mode, mode_configuration, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, id, type, created_at, name, query, group_name, metadata, mode, mode_configuration, *args, **kwargs + ): # noqa: E501 """Detector - a model defined in OpenAPI Args: @@ -205,17 +241,18 @@ def _from_openapi_data(cls, id, type, created_at, name, query, group_name, metad escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -240,22 +277,24 @@ def _from_openapi_data(cls, id, type, created_at, name, query, group_name, metad self.mode = mode self.mode_configuration = mode_configuration for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -300,15 +339,16 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -325,13 +365,17 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/detector_creation_input_request.py b/generated/groundlight_openapi_client/model/detector_creation_input_request.py index 76e0f8a2..ca1b1563 100644 --- a/generated/groundlight_openapi_client/model/detector_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/detector_creation_input_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -36,11 +35,12 @@ def lazy_import(): from groundlight_openapi_client.model.mode_enum import ModeEnum from groundlight_openapi_client.model.multi_class_mode_configuration import MultiClassModeConfiguration from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration - globals()['BoundingBoxModeConfiguration'] = BoundingBoxModeConfiguration - globals()['CountModeConfiguration'] = CountModeConfiguration - globals()['ModeEnum'] = ModeEnum - globals()['MultiClassModeConfiguration'] = MultiClassModeConfiguration - globals()['TextModeConfiguration'] = TextModeConfiguration + + globals()["BoundingBoxModeConfiguration"] = BoundingBoxModeConfiguration + globals()["CountModeConfiguration"] = CountModeConfiguration + globals()["ModeEnum"] = ModeEnum + globals()["MultiClassModeConfiguration"] = MultiClassModeConfiguration + globals()["TextModeConfiguration"] = TextModeConfiguration class DetectorCreationInputRequest(ModelNormal): @@ -67,36 +67,35 @@ class DetectorCreationInputRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 200, - 'min_length': 1, + ("name",): { + "max_length": 200, + "min_length": 1, }, - ('query',): { - 'max_length': 300, - 'min_length': 1, + ("query",): { + "max_length": 300, + "min_length": 1, }, - ('group_name',): { - 'max_length': 100, - 'min_length': 1, + ("group_name",): { + "max_length": 100, + "min_length": 1, }, - ('confidence_threshold',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence_threshold",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, - ('patience_time',): { - 'inclusive_maximum': 3600, - 'inclusive_minimum': 0, + ("patience_time",): { + "inclusive_maximum": 3600, + "inclusive_minimum": 0, }, - ('pipeline_config',): { - 'max_length': 100, + ("pipeline_config",): { + "max_length": 100, }, - ('metadata',): { - 'max_length': 1362, - 'min_length': 1, + ("metadata",): { + "max_length": 1362, + "min_length": 1, }, } @@ -107,7 +106,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -123,36 +132,57 @@ def openapi_types(): """ lazy_import() return { - 'name': (str,), # noqa: E501 - 'query': (str,), # noqa: E501 - 'group_name': (str,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'patience_time': (float,), # noqa: E501 - 'pipeline_config': (str, none_type,), # noqa: E501 - 'metadata': (str,), # noqa: E501 - 'mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'mode_configuration': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + "name": (str,), # noqa: E501 + "query": (str,), # noqa: E501 + "group_name": (str,), # noqa: E501 + "confidence_threshold": (float,), # noqa: E501 + "patience_time": (float,), # noqa: E501 + "pipeline_config": ( + str, + none_type, + ), # noqa: E501 + "metadata": (str,), # noqa: E501 + "mode": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "mode_configuration": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'query': 'query', # noqa: E501 - 'group_name': 'group_name', # noqa: E501 - 'confidence_threshold': 'confidence_threshold', # noqa: E501 - 'patience_time': 'patience_time', # noqa: E501 - 'pipeline_config': 'pipeline_config', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'mode': 'mode', # noqa: E501 - 'mode_configuration': 'mode_configuration', # noqa: E501 + "name": "name", # noqa: E501 + "query": "query", # noqa: E501 + "group_name": "group_name", # noqa: E501 + "confidence_threshold": "confidence_threshold", # noqa: E501 + "patience_time": "patience_time", # noqa: E501 + "pipeline_config": "pipeline_config", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "mode": "mode", # noqa: E501 + "mode_configuration": "mode_configuration", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -205,17 +235,18 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -233,22 +264,24 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 self.name = name self.query = query for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -299,15 +332,16 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -325,13 +359,17 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 self.name = name self.query = query for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/detector_group.py b/generated/groundlight_openapi_client/model/detector_group.py index 7eaa28f7..5620b0c9 100644 --- a/generated/groundlight_openapi_client/model/detector_group.py +++ b/generated/groundlight_openapi_client/model/detector_group.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class DetectorGroup(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,12 +53,11 @@ class DetectorGroup(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 100, + ("name",): { + "max_length": 100, }, } @@ -70,7 +67,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -85,22 +92,21 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 + "id": (str,), # noqa: E501 + "name": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 + "id": "id", # noqa: E501 + "name": "name", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 + "id", # noqa: E501 } _composed_schemas = {} @@ -147,17 +153,18 @@ def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -175,22 +182,24 @@ def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 self.id = id self.name = name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -232,15 +241,16 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -257,13 +267,17 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/detector_group_request.py b/generated/groundlight_openapi_client/model/detector_group_request.py index f28697d3..3302860f 100644 --- a/generated/groundlight_openapi_client/model/detector_group_request.py +++ b/generated/groundlight_openapi_client/model/detector_group_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class DetectorGroupRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,13 +53,12 @@ class DetectorGroupRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 100, - 'min_length': 1, + ("name",): { + "max_length": 100, + "min_length": 1, }, } @@ -71,7 +68,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -86,20 +93,18 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 + "name": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 + "name": "name", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -144,17 +149,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -171,22 +177,24 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -229,15 +237,16 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -254,13 +263,17 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 self.name = name for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/detector_type_enum.py b/generated/groundlight_openapi_client/model/detector_type_enum.py index 49b7825e..94d446da 100644 --- a/generated/groundlight_openapi_client/model/detector_type_enum.py +++ b/generated/groundlight_openapi_client/model/detector_type_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class DetectorTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,13 +50,12 @@ class DetectorTypeEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'DETECTOR': "detector", + ("value",): { + "DETECTOR": "detector", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -75,14 +72,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -90,12 +86,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -141,24 +137,25 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "detector" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -175,7 +172,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -227,26 +225,27 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "detector" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,7 +262,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/edge_model_info.py b/generated/groundlight_openapi_client/model/edge_model_info.py index be63c482..66826368 100644 --- a/generated/groundlight_openapi_client/model/edge_model_info.py +++ b/generated/groundlight_openapi_client/model/edge_model_info.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class EdgeModelInfo(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class EdgeModelInfo(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,32 +88,60 @@ def openapi_types(): and the value is attribute type. """ return { - 'model_binary_id': (str,), # noqa: E501 - 'model_binary_url': (str,), # noqa: E501 - 'oodd_model_binary_id': (str,), # noqa: E501 - 'oodd_model_binary_url': (str,), # noqa: E501 - 'pipeline_config': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'oodd_pipeline_config': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'predictor_metadata': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + "model_binary_id": (str,), # noqa: E501 + "model_binary_url": (str,), # noqa: E501 + "oodd_model_binary_id": (str,), # noqa: E501 + "oodd_model_binary_url": (str,), # noqa: E501 + "pipeline_config": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "oodd_pipeline_config": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "predictor_metadata": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'model_binary_id': 'model_binary_id', # noqa: E501 - 'model_binary_url': 'model_binary_url', # noqa: E501 - 'oodd_model_binary_id': 'oodd_model_binary_id', # noqa: E501 - 'oodd_model_binary_url': 'oodd_model_binary_url', # noqa: E501 - 'pipeline_config': 'pipeline_config', # noqa: E501 - 'oodd_pipeline_config': 'oodd_pipeline_config', # noqa: E501 - 'predictor_metadata': 'predictor_metadata', # noqa: E501 + "model_binary_id": "model_binary_id", # noqa: E501 + "model_binary_url": "model_binary_url", # noqa: E501 + "oodd_model_binary_id": "oodd_model_binary_id", # noqa: E501 + "oodd_model_binary_url": "oodd_model_binary_url", # noqa: E501 + "pipeline_config": "pipeline_config", # noqa: E501 + "oodd_pipeline_config": "oodd_pipeline_config", # noqa: E501 + "predictor_metadata": "predictor_metadata", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -156,17 +190,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 predictor_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,22 +217,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -244,15 +281,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 predictor_metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -268,13 +306,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/escalation_type_enum.py b/generated/groundlight_openapi_client/model/escalation_type_enum.py index 505bba48..2b80360e 100644 --- a/generated/groundlight_openapi_client/model/escalation_type_enum.py +++ b/generated/groundlight_openapi_client/model/escalation_type_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class EscalationTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,14 +50,13 @@ class EscalationTypeEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'STANDARD': "STANDARD", - 'NO_HUMAN_LABELING': "NO_HUMAN_LABELING", + ("value",): { + "STANDARD": "STANDARD", + "NO_HUMAN_LABELING": "NO_HUMAN_LABELING", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -76,14 +73,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -91,12 +87,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -142,10 +138,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -156,14 +152,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -180,7 +177,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -232,12 +230,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -248,14 +246,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -272,7 +271,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/image_query.py b/generated/groundlight_openapi_client/model/image_query.py index 92df5eeb..79cf0179 100644 --- a/generated/groundlight_openapi_client/model/image_query.py +++ b/generated/groundlight_openapi_client/model/image_query.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -39,14 +38,15 @@ def lazy_import(): from groundlight_openapi_client.model.result_type_enum import ResultTypeEnum from groundlight_openapi_client.model.roi import ROI from groundlight_openapi_client.model.text_recognition_result import TextRecognitionResult - globals()['BinaryClassificationResult'] = BinaryClassificationResult - globals()['BoundingBoxResult'] = BoundingBoxResult - globals()['CountingResult'] = CountingResult - globals()['ImageQueryTypeEnum'] = ImageQueryTypeEnum - globals()['MultiClassificationResult'] = MultiClassificationResult - globals()['ROI'] = ROI - globals()['ResultTypeEnum'] = ResultTypeEnum - globals()['TextRecognitionResult'] = TextRecognitionResult + + globals()["BinaryClassificationResult"] = BinaryClassificationResult + globals()["BoundingBoxResult"] = BoundingBoxResult + globals()["CountingResult"] = CountingResult + globals()["ImageQueryTypeEnum"] = ImageQueryTypeEnum + globals()["MultiClassificationResult"] = MultiClassificationResult + globals()["ROI"] = ROI + globals()["ResultTypeEnum"] = ResultTypeEnum + globals()["TextRecognitionResult"] = TextRecognitionResult class ImageQuery(ModelNormal): @@ -73,11 +73,9 @@ class ImageQuery(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -86,7 +84,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -102,61 +110,115 @@ def openapi_types(): """ lazy_import() return { - 'metadata': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'id': (str,), # noqa: E501 - 'type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'query': (str,), # noqa: E501 - 'detector_id': (str,), # noqa: E501 - 'result_type': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'result': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'patience_time': (float,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'rois': ([ROI], none_type,), # noqa: E501 - 'text': (str, none_type,), # noqa: E501 - 'done_processing': (bool,), # noqa: E501 + "metadata": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "id": (str,), # noqa: E501 + "type": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "query": (str,), # noqa: E501 + "detector_id": (str,), # noqa: E501 + "result_type": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "result": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "patience_time": (float,), # noqa: E501 + "confidence_threshold": (float,), # noqa: E501 + "rois": ( + [ROI], + none_type, + ), # noqa: E501 + "text": ( + str, + none_type, + ), # noqa: E501 + "done_processing": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'metadata': 'metadata', # noqa: E501 - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'query': 'query', # noqa: E501 - 'detector_id': 'detector_id', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'result': 'result', # noqa: E501 - 'patience_time': 'patience_time', # noqa: E501 - 'confidence_threshold': 'confidence_threshold', # noqa: E501 - 'rois': 'rois', # noqa: E501 - 'text': 'text', # noqa: E501 - 'done_processing': 'done_processing', # noqa: E501 + "metadata": "metadata", # noqa: E501 + "id": "id", # noqa: E501 + "type": "type", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "query": "query", # noqa: E501 + "detector_id": "detector_id", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "result": "result", # noqa: E501 + "patience_time": "patience_time", # noqa: E501 + "confidence_threshold": "confidence_threshold", # noqa: E501 + "rois": "rois", # noqa: E501 + "text": "text", # noqa: E501 + "done_processing": "done_processing", # noqa: E501 } read_only_vars = { - 'metadata', # noqa: E501 - 'id', # noqa: E501 - 'type', # noqa: E501 - 'created_at', # noqa: E501 - 'query', # noqa: E501 - 'detector_id', # noqa: E501 - 'result_type', # noqa: E501 - 'patience_time', # noqa: E501 - 'confidence_threshold', # noqa: E501 - 'rois', # noqa: E501 - 'text', # noqa: E501 + "metadata", # noqa: E501 + "id", # noqa: E501 + "type", # noqa: E501 + "created_at", # noqa: E501 + "query", # noqa: E501 + "detector_id", # noqa: E501 + "result_type", # noqa: E501 + "patience_time", # noqa: E501 + "confidence_threshold", # noqa: E501 + "rois", # noqa: E501 + "text", # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, metadata, id, type, created_at, query, detector_id, result_type, result, patience_time, confidence_threshold, rois, text, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, + metadata, + id, + type, + created_at, + query, + detector_id, + result_type, + result, + patience_time, + confidence_threshold, + rois, + text, + *args, + **kwargs, + ): # noqa: E501 """ImageQuery - a model defined in OpenAPI Args: @@ -207,17 +269,18 @@ def _from_openapi_data(cls, metadata, id, type, created_at, query, detector_id, done_processing (bool): EDGE ONLY - Whether the image query has completed escalating and will receive no new results.. [optional] if omitted the server will use the default value of False # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -245,22 +308,24 @@ def _from_openapi_data(cls, metadata, id, type, created_at, query, detector_id, self.rois = rois self.text = text for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -302,15 +367,16 @@ def __init__(self, result, *args, **kwargs): # noqa: E501 done_processing (bool): EDGE ONLY - Whether the image query has completed escalating and will receive no new results.. [optional] if omitted the server will use the default value of False # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -327,13 +393,17 @@ def __init__(self, result, *args, **kwargs): # noqa: E501 self.result = result for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/image_query_type_enum.py b/generated/groundlight_openapi_client/model/image_query_type_enum.py index 41939968..42470730 100644 --- a/generated/groundlight_openapi_client/model/image_query_type_enum.py +++ b/generated/groundlight_openapi_client/model/image_query_type_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class ImageQueryTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,13 +50,12 @@ class ImageQueryTypeEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'IMAGE_QUERY': "image_query", + ("value",): { + "IMAGE_QUERY": "image_query", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -75,14 +72,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -90,12 +86,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -141,24 +137,25 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "image_query" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -175,7 +172,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -227,26 +225,27 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) else: value = "image_query" - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -263,7 +262,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/inline_response200.py b/generated/groundlight_openapi_client/model/inline_response200.py index 1810e3d4..62e2494f 100644 --- a/generated/groundlight_openapi_client/model/inline_response200.py +++ b/generated/groundlight_openapi_client/model/inline_response200.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.inline_response200_summary import InlineResponse200Summary - globals()['InlineResponse200Summary'] = InlineResponse200Summary + + globals()["InlineResponse200Summary"] = InlineResponse200Summary class InlineResponse200(ModelNormal): @@ -59,11 +59,9 @@ class InlineResponse200(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,20 +96,18 @@ def openapi_types(): """ lazy_import() return { - 'summary': (InlineResponse200Summary,), # noqa: E501 + "summary": (InlineResponse200Summary,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'summary': 'summary', # noqa: E501 + "summary": "summary", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -144,17 +150,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 summary (InlineResponse200Summary): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,22 +177,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -226,15 +235,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 summary (InlineResponse200Summary): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -250,13 +260,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/inline_response2001.py b/generated/groundlight_openapi_client/model/inline_response2001.py index e859dec3..cdb30032 100644 --- a/generated/groundlight_openapi_client/model/inline_response2001.py +++ b/generated/groundlight_openapi_client/model/inline_response2001.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,17 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from groundlight_openapi_client.model.inline_response2001_evaluation_results import InlineResponse2001EvaluationResults - globals()['InlineResponse2001EvaluationResults'] = InlineResponse2001EvaluationResults + from groundlight_openapi_client.model.inline_response2001_evaluation_results import ( + InlineResponse2001EvaluationResults, + ) + + globals()["InlineResponse2001EvaluationResults"] = InlineResponse2001EvaluationResults class InlineResponse2001(ModelNormal): @@ -59,11 +61,9 @@ class InlineResponse2001(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +72,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,20 +98,18 @@ def openapi_types(): """ lazy_import() return { - 'evaluation_results': (InlineResponse2001EvaluationResults,), # noqa: E501 + "evaluation_results": (InlineResponse2001EvaluationResults,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'evaluation_results': 'evaluation_results', # noqa: E501 + "evaluation_results": "evaluation_results", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -144,17 +152,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 evaluation_results (InlineResponse2001EvaluationResults): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,22 +179,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -226,15 +237,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 evaluation_results (InlineResponse2001EvaluationResults): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -250,13 +262,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py index 52864916..9ee33a84 100644 --- a/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py +++ b/generated/groundlight_openapi_client/model/inline_response2001_evaluation_results.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class InlineResponse2001EvaluationResults(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class InlineResponse2001EvaluationResults(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = True @@ -82,56 +88,105 @@ def openapi_types(): and the value is attribute type. """ return { - 'eval_timestamp': (datetime,), # noqa: E501 - 'total_ground_truth_examples': (int, none_type,), # noqa: E501 - 'total_labeled_examples': (int, none_type,), # noqa: E501 - 'kfold_pooled__balanced_accuracy': (float,), # noqa: E501 - 'kfold_pooled__positive_accuracy': (float, none_type,), # noqa: E501 - 'kfold_pooled__negative_accuracy': (float, none_type,), # noqa: E501 - 'precision__mean': (float, none_type,), # noqa: E501 - 'recall__mean': (float, none_type,), # noqa: E501 - 'roc_auc__mean': (float, none_type,), # noqa: E501 - 'balanced_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'positive_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'negative_system_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'mean_absolute_error__mean': (float, none_type,), # noqa: E501 - 'objdet_precision__mean': (float, none_type,), # noqa: E501 - 'objdet_recall__mean': (float, none_type,), # noqa: E501 - 'objdet_f1_score__mean': (float, none_type,), # noqa: E501 - 'class_accuracies': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'confusion_dict': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'num_examples_per_class': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + "eval_timestamp": (datetime,), # noqa: E501 + "total_ground_truth_examples": ( + int, + none_type, + ), # noqa: E501 + "total_labeled_examples": ( + int, + none_type, + ), # noqa: E501 + "kfold_pooled__balanced_accuracy": (float,), # noqa: E501 + "kfold_pooled__positive_accuracy": ( + float, + none_type, + ), # noqa: E501 + "kfold_pooled__negative_accuracy": ( + float, + none_type, + ), # noqa: E501 + "precision__mean": ( + float, + none_type, + ), # noqa: E501 + "recall__mean": ( + float, + none_type, + ), # noqa: E501 + "roc_auc__mean": ( + float, + none_type, + ), # noqa: E501 + "balanced_system_accuracies": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "positive_system_accuracies": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "negative_system_accuracies": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "mean_absolute_error__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_precision__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_recall__mean": ( + float, + none_type, + ), # noqa: E501 + "objdet_f1_score__mean": ( + float, + none_type, + ), # noqa: E501 + "class_accuracies": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "confusion_dict": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "num_examples_per_class": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'eval_timestamp': 'eval_timestamp', # noqa: E501 - 'total_ground_truth_examples': 'total_ground_truth_examples', # noqa: E501 - 'total_labeled_examples': 'total_labeled_examples', # noqa: E501 - 'kfold_pooled__balanced_accuracy': 'kfold_pooled__balanced_accuracy', # noqa: E501 - 'kfold_pooled__positive_accuracy': 'kfold_pooled__positive_accuracy', # noqa: E501 - 'kfold_pooled__negative_accuracy': 'kfold_pooled__negative_accuracy', # noqa: E501 - 'precision__mean': 'precision__mean', # noqa: E501 - 'recall__mean': 'recall__mean', # noqa: E501 - 'roc_auc__mean': 'roc_auc__mean', # noqa: E501 - 'balanced_system_accuracies': 'balanced_system_accuracies', # noqa: E501 - 'positive_system_accuracies': 'positive_system_accuracies', # noqa: E501 - 'negative_system_accuracies': 'negative_system_accuracies', # noqa: E501 - 'mean_absolute_error__mean': 'mean_absolute_error__mean', # noqa: E501 - 'objdet_precision__mean': 'objdet_precision__mean', # noqa: E501 - 'objdet_recall__mean': 'objdet_recall__mean', # noqa: E501 - 'objdet_f1_score__mean': 'objdet_f1_score__mean', # noqa: E501 - 'class_accuracies': 'class_accuracies', # noqa: E501 - 'confusion_dict': 'confusion_dict', # noqa: E501 - 'num_examples_per_class': 'num_examples_per_class', # noqa: E501 + "eval_timestamp": "eval_timestamp", # noqa: E501 + "total_ground_truth_examples": "total_ground_truth_examples", # noqa: E501 + "total_labeled_examples": "total_labeled_examples", # noqa: E501 + "kfold_pooled__balanced_accuracy": "kfold_pooled__balanced_accuracy", # noqa: E501 + "kfold_pooled__positive_accuracy": "kfold_pooled__positive_accuracy", # noqa: E501 + "kfold_pooled__negative_accuracy": "kfold_pooled__negative_accuracy", # noqa: E501 + "precision__mean": "precision__mean", # noqa: E501 + "recall__mean": "recall__mean", # noqa: E501 + "roc_auc__mean": "roc_auc__mean", # noqa: E501 + "balanced_system_accuracies": "balanced_system_accuracies", # noqa: E501 + "positive_system_accuracies": "positive_system_accuracies", # noqa: E501 + "negative_system_accuracies": "negative_system_accuracies", # noqa: E501 + "mean_absolute_error__mean": "mean_absolute_error__mean", # noqa: E501 + "objdet_precision__mean": "objdet_precision__mean", # noqa: E501 + "objdet_recall__mean": "objdet_recall__mean", # noqa: E501 + "objdet_f1_score__mean": "objdet_f1_score__mean", # noqa: E501 + "class_accuracies": "class_accuracies", # noqa: E501 + "confusion_dict": "confusion_dict", # noqa: E501 + "num_examples_per_class": "num_examples_per_class", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -192,17 +247,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -218,22 +274,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -292,15 +350,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 num_examples_per_class ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -316,13 +375,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/inline_response2002.py b/generated/groundlight_openapi_client/model/inline_response2002.py index be8dc03e..1fbfd51d 100644 --- a/generated/groundlight_openapi_client/model/inline_response2002.py +++ b/generated/groundlight_openapi_client/model/inline_response2002.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class InlineResponse2002(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class InlineResponse2002(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,20 +88,18 @@ def openapi_types(): and the value is attribute type. """ return { - 'username': (str,), # noqa: E501 + "username": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'username': 'username', # noqa: E501 + "username": "username", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -138,17 +142,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 username (str): The user's username. [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -164,22 +169,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -220,15 +227,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 username (str): The user's username. [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -244,13 +252,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/inline_response200_summary.py b/generated/groundlight_openapi_client/model/inline_response200_summary.py index 61601c59..d5c30a12 100644 --- a/generated/groundlight_openapi_client/model/inline_response200_summary.py +++ b/generated/groundlight_openapi_client/model/inline_response200_summary.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,17 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): - from groundlight_openapi_client.model.inline_response200_summary_class_counts import InlineResponse200SummaryClassCounts - globals()['InlineResponse200SummaryClassCounts'] = InlineResponse200SummaryClassCounts + from groundlight_openapi_client.model.inline_response200_summary_class_counts import ( + InlineResponse200SummaryClassCounts, + ) + + globals()["InlineResponse200SummaryClassCounts"] = InlineResponse200SummaryClassCounts class InlineResponse200Summary(ModelNormal): @@ -59,11 +61,9 @@ class InlineResponse200Summary(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +72,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = True @@ -88,28 +98,28 @@ def openapi_types(): """ lazy_import() return { - 'num_ground_truth': (int,), # noqa: E501 - 'num_current_source_human': (int,), # noqa: E501 - 'class_counts': (InlineResponse200SummaryClassCounts,), # noqa: E501 - 'unconfident_counts': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'total_iqs': (int,), # noqa: E501 + "num_ground_truth": (int,), # noqa: E501 + "num_current_source_human": (int,), # noqa: E501 + "class_counts": (InlineResponse200SummaryClassCounts,), # noqa: E501 + "unconfident_counts": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + ), # noqa: E501 + "total_iqs": (int,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'num_ground_truth': 'num_ground_truth', # noqa: E501 - 'num_current_source_human': 'num_current_source_human', # noqa: E501 - 'class_counts': 'class_counts', # noqa: E501 - 'unconfident_counts': 'unconfident_counts', # noqa: E501 - 'total_iqs': 'total_iqs', # noqa: E501 + "num_ground_truth": "num_ground_truth", # noqa: E501 + "num_current_source_human": "num_current_source_human", # noqa: E501 + "class_counts": "class_counts", # noqa: E501 + "unconfident_counts": "unconfident_counts", # noqa: E501 + "total_iqs": "total_iqs", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -156,17 +166,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 total_iqs (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,22 +193,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -242,15 +255,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 total_iqs (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -266,13 +280,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py b/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py index 49f7d401..b2eb180b 100644 --- a/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py +++ b/generated/groundlight_openapi_client/model/inline_response200_summary_class_counts.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class InlineResponse200SummaryClassCounts(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class InlineResponse200SummaryClassCounts(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,28 +88,26 @@ def openapi_types(): and the value is attribute type. """ return { - 'source_ml': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'source_human': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'cloud_labeler': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'cloud': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'total': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "source_ml": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "source_human": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "cloud_labeler": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "cloud": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "total": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'source_ml': 'source_ml', # noqa: E501 - 'source_human': 'source_human', # noqa: E501 - 'cloud_labeler': 'cloud_labeler', # noqa: E501 - 'cloud': 'cloud', # noqa: E501 - 'total': 'total', # noqa: E501 + "source_ml": "source_ml", # noqa: E501 + "source_human": "source_human", # noqa: E501 + "cloud_labeler": "cloud_labeler", # noqa: E501 + "cloud": "cloud", # noqa: E501 + "total": "total", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -150,17 +154,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 total ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -176,22 +181,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -236,15 +243,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 total ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -260,13 +268,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/label.py b/generated/groundlight_openapi_client/model/label.py index cc19ad47..810b9e2e 100644 --- a/generated/groundlight_openapi_client/model/label.py +++ b/generated/groundlight_openapi_client/model/label.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class Label(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,15 +50,14 @@ class Label(ModelSimple): """ allowed_values = { - ('value',): { - 'YES': "YES", - 'NO': "NO", - 'UNCLEAR': "UNCLEAR", + ("value",): { + "YES": "YES", + "NO": "NO", + "UNCLEAR": "UNCLEAR", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -77,14 +74,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -92,12 +88,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -143,10 +139,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -157,14 +153,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -181,7 +178,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -233,12 +231,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -249,14 +247,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,7 +272,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/label_value.py b/generated/groundlight_openapi_client/model/label_value.py index 12324f28..ee9b73e9 100644 --- a/generated/groundlight_openapi_client/model/label_value.py +++ b/generated/groundlight_openapi_client/model/label_value.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.roi import ROI - globals()['ROI'] = ROI + + globals()["ROI"] = ROI class LabelValue(ModelNormal): @@ -59,11 +59,9 @@ class LabelValue(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,47 +96,63 @@ def openapi_types(): """ lazy_import() return { - 'confidence': (float, none_type,), # noqa: E501 - 'class_name': (str, none_type,), # noqa: E501 - 'annotations_requested': ([str],), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'detector_id': (int, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'text': (str, none_type,), # noqa: E501 - 'rois': ([ROI], none_type,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "class_name": ( + str, + none_type, + ), # noqa: E501 + "annotations_requested": ([str],), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "detector_id": ( + int, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "text": ( + str, + none_type, + ), # noqa: E501 + "rois": ( + [ROI], + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'confidence': 'confidence', # noqa: E501 - 'class_name': 'class_name', # noqa: E501 - 'annotations_requested': 'annotations_requested', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'detector_id': 'detector_id', # noqa: E501 - 'source': 'source', # noqa: E501 - 'text': 'text', # noqa: E501 - 'rois': 'rois', # noqa: E501 + "confidence": "confidence", # noqa: E501 + "class_name": "class_name", # noqa: E501 + "annotations_requested": "annotations_requested", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "detector_id": "detector_id", # noqa: E501 + "source": "source", # noqa: E501 + "text": "text", # noqa: E501 + "rois": "rois", # noqa: E501 } read_only_vars = { - 'confidence', # noqa: E501 - 'class_name', # noqa: E501 - 'annotations_requested', # noqa: E501 - 'created_at', # noqa: E501 - 'detector_id', # noqa: E501 - 'source', # noqa: E501 - 'text', # noqa: E501 + "confidence", # noqa: E501 + "class_name", # noqa: E501 + "annotations_requested", # noqa: E501 + "created_at", # noqa: E501 + "detector_id", # noqa: E501 + "source", # noqa: E501 + "text", # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, confidence, class_name, annotations_requested, created_at, detector_id, source, text, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, confidence, class_name, annotations_requested, created_at, detector_id, source, text, *args, **kwargs + ): # noqa: E501 """LabelValue - a model defined in OpenAPI Args: @@ -174,17 +198,18 @@ def _from_openapi_data(cls, confidence, class_name, annotations_requested, creat rois ([ROI], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -207,22 +232,24 @@ def _from_openapi_data(cls, confidence, class_name, annotations_requested, creat self.source = source self.text = text for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -263,15 +290,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 rois ([ROI], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -287,13 +315,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/label_value_request.py b/generated/groundlight_openapi_client/model/label_value_request.py index ab086120..434f8ad8 100644 --- a/generated/groundlight_openapi_client/model/label_value_request.py +++ b/generated/groundlight_openapi_client/model/label_value_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.roi_request import ROIRequest - globals()['ROIRequest'] = ROIRequest + + globals()["ROIRequest"] = ROIRequest class LabelValueRequest(ModelNormal): @@ -59,12 +59,11 @@ class LabelValueRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('image_query_id',): { - 'min_length': 1, + ("image_query_id",): { + "min_length": 1, }, } @@ -75,7 +74,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -91,24 +100,28 @@ def openapi_types(): """ lazy_import() return { - 'label': (str, none_type,), # noqa: E501 - 'image_query_id': (str,), # noqa: E501 - 'rois': ([ROIRequest], none_type,), # noqa: E501 + "label": ( + str, + none_type, + ), # noqa: E501 + "image_query_id": (str,), # noqa: E501 + "rois": ( + [ROIRequest], + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'image_query_id': 'image_query_id', # noqa: E501 - 'rois': 'rois', # noqa: E501 + "label": "label", # noqa: E501 + "image_query_id": "image_query_id", # noqa: E501 + "rois": "rois", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -155,17 +168,18 @@ def _from_openapi_data(cls, label, image_query_id, *args, **kwargs): # noqa: E5 rois ([ROIRequest], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,22 +197,24 @@ def _from_openapi_data(cls, label, image_query_id, *args, **kwargs): # noqa: E5 self.label = label self.image_query_id = image_query_id for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -243,15 +259,16 @@ def __init__(self, label, image_query_id, *args, **kwargs): # noqa: E501 rois ([ROIRequest], none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -269,13 +286,17 @@ def __init__(self, label, image_query_id, *args, **kwargs): # noqa: E501 self.label = label self.image_query_id = image_query_id for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/mode_enum.py b/generated/groundlight_openapi_client/model/mode_enum.py index 5b1b2594..b35a3833 100644 --- a/generated/groundlight_openapi_client/model/mode_enum.py +++ b/generated/groundlight_openapi_client/model/mode_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class ModeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,17 +50,16 @@ class ModeEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'BINARY': "BINARY", - 'COUNT': "COUNT", - 'MULTI_CLASS': "MULTI_CLASS", - 'TEXT': "TEXT", - 'BOUNDING_BOX': "BOUNDING_BOX", + ("value",): { + "BINARY": "BINARY", + "COUNT": "COUNT", + "MULTI_CLASS": "MULTI_CLASS", + "TEXT": "TEXT", + "BOUNDING_BOX": "BOUNDING_BOX", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -79,14 +76,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -94,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -145,10 +141,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -159,14 +155,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,7 +180,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -235,12 +233,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -251,14 +249,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -275,7 +274,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py b/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py index 1755866c..f08ee27c 100644 --- a/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/multi_class_mode_configuration.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class MultiClassModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class MultiClassModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,22 +88,20 @@ def openapi_types(): and the value is attribute type. """ return { - 'class_names': ([str],), # noqa: E501 - 'num_classes': (int,), # noqa: E501 + "class_names": ([str],), # noqa: E501 + "num_classes": (int,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'class_names': 'class_names', # noqa: E501 - 'num_classes': 'num_classes', # noqa: E501 + "class_names": "class_names", # noqa: E501 + "num_classes": "num_classes", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -143,17 +147,18 @@ def _from_openapi_data(cls, class_names, *args, **kwargs): # noqa: E501 num_classes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,22 +175,24 @@ def _from_openapi_data(cls, class_names, *args, **kwargs): # noqa: E501 self.class_names = class_names for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -229,15 +236,16 @@ def __init__(self, class_names, *args, **kwargs): # noqa: E501 num_classes (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -254,13 +262,17 @@ def __init__(self, class_names, *args, **kwargs): # noqa: E501 self.class_names = class_names for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/multi_classification_result.py b/generated/groundlight_openapi_client/model/multi_classification_result.py index 1620d757..bfc778c5 100644 --- a/generated/groundlight_openapi_client/model/multi_classification_result.py +++ b/generated/groundlight_openapi_client/model/multi_classification_result.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class MultiClassificationResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,15 +54,15 @@ class MultiClassificationResult(ModelNormal): """ allowed_values = { - ('result_type',): { - 'MULTI_CLASSIFICATION': "multi_classification", + ("result_type",): { + "MULTI_CLASSIFICATION": "multi_classification", }, } validations = { - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -74,7 +72,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -89,28 +97,29 @@ def openapi_types(): and the value is attribute type. """ return { - 'label': (str,), # noqa: E501 - 'confidence': (float, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'result_type': (str,), # noqa: E501 - 'from_edge': (bool,), # noqa: E501 + "label": (str,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'source': 'source', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'from_edge': 'from_edge', # noqa: E501 + "label": "label", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -159,17 +168,18 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -186,22 +196,24 @@ def _from_openapi_data(cls, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -248,15 +260,16 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -273,13 +286,17 @@ def __init__(self, label, *args, **kwargs): # noqa: E501 self.label = label for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/note.py b/generated/groundlight_openapi_client/model/note.py index 28479f35..64f139a7 100644 --- a/generated/groundlight_openapi_client/model/note.py +++ b/generated/groundlight_openapi_client/model/note.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class Note(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class Note(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,24 +88,29 @@ def openapi_types(): and the value is attribute type. """ return { - 'detector_id': (str,), # noqa: E501 - 'content': (str, none_type,), # noqa: E501 - 'is_pinned': (bool, none_type,), # noqa: E501 + "detector_id": (str,), # noqa: E501 + "content": ( + str, + none_type, + ), # noqa: E501 + "is_pinned": ( + bool, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'detector_id': 'detector_id', # noqa: E501 - 'content': 'content', # noqa: E501 - 'is_pinned': 'is_pinned', # noqa: E501 + "detector_id": "detector_id", # noqa: E501 + "content": "content", # noqa: E501 + "is_pinned": "is_pinned", # noqa: E501 } read_only_vars = { - 'detector_id', # noqa: E501 + "detector_id", # noqa: E501 } _composed_schemas = {} @@ -147,17 +158,18 @@ def _from_openapi_data(cls, detector_id, *args, **kwargs): # noqa: E501 is_pinned (bool, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -174,22 +186,24 @@ def _from_openapi_data(cls, detector_id, *args, **kwargs): # noqa: E501 self.detector_id = detector_id for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -231,15 +245,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 is_pinned (bool, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -255,13 +270,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/note_request.py b/generated/groundlight_openapi_client/model/note_request.py index 67063709..95889010 100644 --- a/generated/groundlight_openapi_client/model/note_request.py +++ b/generated/groundlight_openapi_client/model/note_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class NoteRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class NoteRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,24 +88,31 @@ def openapi_types(): and the value is attribute type. """ return { - 'content': (str, none_type,), # noqa: E501 - 'is_pinned': (bool, none_type,), # noqa: E501 - 'image': (file_type, none_type,), # noqa: E501 + "content": ( + str, + none_type, + ), # noqa: E501 + "is_pinned": ( + bool, + none_type, + ), # noqa: E501 + "image": ( + file_type, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'content': 'content', # noqa: E501 - 'is_pinned': 'is_pinned', # noqa: E501 - 'image': 'image', # noqa: E501 + "content": "content", # noqa: E501 + "is_pinned": "is_pinned", # noqa: E501 + "image": "image", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -144,17 +157,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 image (file_type, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,22 +184,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -228,15 +244,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 image (file_type, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -252,13 +269,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/paginated_detector_list.py b/generated/groundlight_openapi_client/model/paginated_detector_list.py index 391aad23..5972205e 100644 --- a/generated/groundlight_openapi_client/model/paginated_detector_list.py +++ b/generated/groundlight_openapi_client/model/paginated_detector_list.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.detector import Detector - globals()['Detector'] = Detector + + globals()["Detector"] = Detector class PaginatedDetectorList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedDetectorList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,26 +96,30 @@ def openapi_types(): """ lazy_import() return { - 'count': (int,), # noqa: E501 - 'results': ([Detector],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([Detector],), # noqa: E501 + "next": ( + str, + none_type, + ), # noqa: E501 + "previous": ( + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'count': 'count', # noqa: E501 - 'results': 'results', # noqa: E501 - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 + "count": "count", # noqa: E501 + "results": "results", # noqa: E501 + "next": "next", # noqa: E501 + "previous": "previous", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -155,17 +167,18 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,22 +196,24 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -244,15 +259,16 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -270,13 +286,17 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/paginated_image_query_list.py b/generated/groundlight_openapi_client/model/paginated_image_query_list.py index d8c7cc17..13dccab7 100644 --- a/generated/groundlight_openapi_client/model/paginated_image_query_list.py +++ b/generated/groundlight_openapi_client/model/paginated_image_query_list.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.image_query import ImageQuery - globals()['ImageQuery'] = ImageQuery + + globals()["ImageQuery"] = ImageQuery class PaginatedImageQueryList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedImageQueryList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,26 +96,30 @@ def openapi_types(): """ lazy_import() return { - 'count': (int,), # noqa: E501 - 'results': ([ImageQuery],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([ImageQuery],), # noqa: E501 + "next": ( + str, + none_type, + ), # noqa: E501 + "previous": ( + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'count': 'count', # noqa: E501 - 'results': 'results', # noqa: E501 - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 + "count": "count", # noqa: E501 + "results": "results", # noqa: E501 + "next": "next", # noqa: E501 + "previous": "previous", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -155,17 +167,18 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,22 +196,24 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -244,15 +259,16 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -270,13 +286,17 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/paginated_rule_list.py b/generated/groundlight_openapi_client/model/paginated_rule_list.py index 7102f4eb..6d007e1d 100644 --- a/generated/groundlight_openapi_client/model/paginated_rule_list.py +++ b/generated/groundlight_openapi_client/model/paginated_rule_list.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.rule import Rule - globals()['Rule'] = Rule + + globals()["Rule"] = Rule class PaginatedRuleList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedRuleList(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,26 +96,30 @@ def openapi_types(): """ lazy_import() return { - 'count': (int,), # noqa: E501 - 'results': ([Rule],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([Rule],), # noqa: E501 + "next": ( + str, + none_type, + ), # noqa: E501 + "previous": ( + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'count': 'count', # noqa: E501 - 'results': 'results', # noqa: E501 - 'next': 'next', # noqa: E501 - 'previous': 'previous', # noqa: E501 + "count": "count", # noqa: E501 + "results": "results", # noqa: E501 + "next": "next", # noqa: E501 + "previous": "previous", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -155,17 +167,18 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,22 +196,24 @@ def _from_openapi_data(cls, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -244,15 +259,16 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 previous (str, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -270,13 +286,17 @@ def __init__(self, count, results, *args, **kwargs): # noqa: E501 self.count = count self.results = results for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 06e8f5a7..7e7a5813 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -33,8 +32,9 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum from groundlight_openapi_client.model.status_enum import StatusEnum - globals()['BlankEnum'] = BlankEnum - globals()['StatusEnum'] = StatusEnum + + globals()["BlankEnum"] = BlankEnum + globals()["StatusEnum"] = StatusEnum class PatchedDetectorRequest(ModelNormal): @@ -61,24 +61,23 @@ class PatchedDetectorRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 200, - 'min_length': 1, + ("name",): { + "max_length": 200, + "min_length": 1, }, - ('confidence_threshold',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence_threshold",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, - ('patience_time',): { - 'inclusive_maximum': 3600, - 'inclusive_minimum': 0, + ("patience_time",): { + "inclusive_maximum": 3600, + "inclusive_minimum": 0, }, - ('escalation_type',): { - 'min_length': 1, + ("escalation_type",): { + "min_length": 1, }, } @@ -89,7 +88,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -105,28 +114,36 @@ def openapi_types(): """ lazy_import() return { - 'name': (str,), # noqa: E501 - 'confidence_threshold': (float,), # noqa: E501 - 'patience_time': (float,), # noqa: E501 - 'status': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'escalation_type': (str,), # noqa: E501 + "name": (str,), # noqa: E501 + "confidence_threshold": (float,), # noqa: E501 + "patience_time": (float,), # noqa: E501 + "status": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "escalation_type": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'confidence_threshold': 'confidence_threshold', # noqa: E501 - 'patience_time': 'patience_time', # noqa: E501 - 'status': 'status', # noqa: E501 - 'escalation_type': 'escalation_type', # noqa: E501 + "name": "name", # noqa: E501 + "confidence_threshold": "confidence_threshold", # noqa: E501 + "patience_time": "patience_time", # noqa: E501 + "status": "status", # noqa: E501 + "escalation_type": "escalation_type", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -173,17 +190,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -199,22 +217,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -259,15 +279,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 escalation_type (str): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -283,13 +304,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/payload_template.py b/generated/groundlight_openapi_client/model/payload_template.py index d3037a5a..a721bb4c 100644 --- a/generated/groundlight_openapi_client/model/payload_template.py +++ b/generated/groundlight_openapi_client/model/payload_template.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class PayloadTemplate(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class PayloadTemplate(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -67,7 +63,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -82,22 +88,23 @@ def openapi_types(): and the value is attribute type. """ return { - 'template': (str,), # noqa: E501 - 'headers': ({str: (str,)}, none_type,), # noqa: E501 + "template": (str,), # noqa: E501 + "headers": ( + {str: (str,)}, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'template': 'template', # noqa: E501 - 'headers': 'headers', # noqa: E501 + "template": "template", # noqa: E501 + "headers": "headers", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -143,17 +150,18 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -170,22 +178,24 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -229,15 +239,16 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -254,13 +265,17 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/payload_template_request.py b/generated/groundlight_openapi_client/model/payload_template_request.py index 343ac2ed..3a0f12a2 100644 --- a/generated/groundlight_openapi_client/model/payload_template_request.py +++ b/generated/groundlight_openapi_client/model/payload_template_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class PayloadTemplateRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,12 +53,11 @@ class PayloadTemplateRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('template',): { - 'min_length': 1, + ("template",): { + "min_length": 1, }, } @@ -70,7 +67,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -85,22 +92,23 @@ def openapi_types(): and the value is attribute type. """ return { - 'template': (str,), # noqa: E501 - 'headers': ({str: (str,)}, none_type,), # noqa: E501 + "template": (str,), # noqa: E501 + "headers": ( + {str: (str,)}, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'template': 'template', # noqa: E501 - 'headers': 'headers', # noqa: E501 + "template": "template", # noqa: E501 + "headers": "headers", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -146,17 +154,18 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -173,22 +182,24 @@ def _from_openapi_data(cls, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -232,15 +243,16 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 headers ({str: (str,)}, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -257,13 +269,17 @@ def __init__(self, template, *args, **kwargs): # noqa: E501 self.template = template for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/result_type_enum.py b/generated/groundlight_openapi_client/model/result_type_enum.py index a2b7a7c6..c4b954fd 100644 --- a/generated/groundlight_openapi_client/model/result_type_enum.py +++ b/generated/groundlight_openapi_client/model/result_type_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class ResultTypeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,17 +50,16 @@ class ResultTypeEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'BINARY_CLASSIFICATION': "binary_classification", - 'COUNTING': "counting", - 'MULTI_CLASSIFICATION': "multi_classification", - 'TEXT_RECOGNITION': "text_recognition", - 'BOUNDING_BOX': "bounding_box", + ("value",): { + "BINARY_CLASSIFICATION": "binary_classification", + "COUNTING": "counting", + "MULTI_CLASSIFICATION": "multi_classification", + "TEXT_RECOGNITION": "text_recognition", + "BOUNDING_BOX": "bounding_box", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -79,14 +76,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -94,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -145,10 +141,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -159,14 +155,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,7 +180,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -235,12 +233,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -251,14 +249,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -275,7 +274,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/roi.py b/generated/groundlight_openapi_client/model/roi.py index 368b00de..74c4fc66 100644 --- a/generated/groundlight_openapi_client/model/roi.py +++ b/generated/groundlight_openapi_client/model/roi.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.b_box_geometry import BBoxGeometry - globals()['BBoxGeometry'] = BBoxGeometry + + globals()["BBoxGeometry"] = BBoxGeometry class ROI(ModelNormal): @@ -59,11 +59,9 @@ class ROI(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -72,7 +70,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -88,24 +96,23 @@ def openapi_types(): """ lazy_import() return { - 'label': (str,), # noqa: E501 - 'score': (float,), # noqa: E501 - 'geometry': (BBoxGeometry,), # noqa: E501 + "label": (str,), # noqa: E501 + "score": (float,), # noqa: E501 + "geometry": (BBoxGeometry,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'score': 'score', # noqa: E501 - 'geometry': 'geometry', # noqa: E501 + "label": "label", # noqa: E501 + "score": "score", # noqa: E501 + "geometry": "geometry", # noqa: E501 } read_only_vars = { - 'score', # noqa: E501 + "score", # noqa: E501 } _composed_schemas = {} @@ -153,17 +160,18 @@ def _from_openapi_data(cls, label, score, geometry, *args, **kwargs): # noqa: E _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,22 +190,24 @@ def _from_openapi_data(cls, label, score, geometry, *args, **kwargs): # noqa: E self.score = score self.geometry = geometry for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -241,15 +251,16 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -267,13 +278,17 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/roi_request.py b/generated/groundlight_openapi_client/model/roi_request.py index 14918a8f..07fb54e2 100644 --- a/generated/groundlight_openapi_client/model/roi_request.py +++ b/generated/groundlight_openapi_client/model/roi_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.b_box_geometry_request import BBoxGeometryRequest - globals()['BBoxGeometryRequest'] = BBoxGeometryRequest + + globals()["BBoxGeometryRequest"] = BBoxGeometryRequest class ROIRequest(ModelNormal): @@ -59,12 +59,11 @@ class ROIRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('label',): { - 'min_length': 1, + ("label",): { + "min_length": 1, }, } @@ -75,7 +74,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -91,22 +100,20 @@ def openapi_types(): """ lazy_import() return { - 'label': (str,), # noqa: E501 - 'geometry': (BBoxGeometryRequest,), # noqa: E501 + "label": (str,), # noqa: E501 + "geometry": (BBoxGeometryRequest,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'label': 'label', # noqa: E501 - 'geometry': 'geometry', # noqa: E501 + "label": "label", # noqa: E501 + "geometry": "geometry", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -152,17 +159,18 @@ def _from_openapi_data(cls, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -180,22 +188,24 @@ def _from_openapi_data(cls, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -239,15 +249,16 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 _visited_composed_classes = (Animal,) """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -265,13 +276,17 @@ def __init__(self, label, geometry, *args, **kwargs): # noqa: E501 self.label = label self.geometry = geometry for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/rule.py b/generated/groundlight_openapi_client/model/rule.py index 66991d0c..7f1be14a 100644 --- a/generated/groundlight_openapi_client/model/rule.py +++ b/generated/groundlight_openapi_client/model/rule.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -36,11 +35,12 @@ def lazy_import(): from groundlight_openapi_client.model.condition import Condition from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum from groundlight_openapi_client.model.webhook_action import WebhookAction - globals()['Action'] = Action - globals()['ActionList'] = ActionList - globals()['Condition'] = Condition - globals()['SnoozeTimeUnitEnum'] = SnoozeTimeUnitEnum - globals()['WebhookAction'] = WebhookAction + + globals()["Action"] = Action + globals()["ActionList"] = ActionList + globals()["Condition"] = Condition + globals()["SnoozeTimeUnitEnum"] = SnoozeTimeUnitEnum + globals()["WebhookAction"] = WebhookAction class Rule(ModelNormal): @@ -67,15 +67,14 @@ class Rule(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 44, + ("name",): { + "max_length": 44, }, - ('snooze_time_value',): { - 'inclusive_minimum': 0, + ("snooze_time_value",): { + "inclusive_minimum": 0, }, } @@ -86,7 +85,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -102,44 +111,63 @@ def openapi_types(): """ lazy_import() return { - 'id': (int,), # noqa: E501 - 'detector_id': (str,), # noqa: E501 - 'detector_name': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'condition': (Condition,), # noqa: E501 - 'enabled': (bool,), # noqa: E501 - 'snooze_time_enabled': (bool,), # noqa: E501 - 'snooze_time_value': (int,), # noqa: E501 - 'snooze_time_unit': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'human_review_required': (bool,), # noqa: E501 - 'action': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'webhook_action': ([WebhookAction],), # noqa: E501 + "id": (int,), # noqa: E501 + "detector_id": (str,), # noqa: E501 + "detector_name": (str,), # noqa: E501 + "name": (str,), # noqa: E501 + "condition": (Condition,), # noqa: E501 + "enabled": (bool,), # noqa: E501 + "snooze_time_enabled": (bool,), # noqa: E501 + "snooze_time_value": (int,), # noqa: E501 + "snooze_time_unit": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "human_review_required": (bool,), # noqa: E501 + "action": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "webhook_action": ([WebhookAction],), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'detector_id': 'detector_id', # noqa: E501 - 'detector_name': 'detector_name', # noqa: E501 - 'name': 'name', # noqa: E501 - 'condition': 'condition', # noqa: E501 - 'enabled': 'enabled', # noqa: E501 - 'snooze_time_enabled': 'snooze_time_enabled', # noqa: E501 - 'snooze_time_value': 'snooze_time_value', # noqa: E501 - 'snooze_time_unit': 'snooze_time_unit', # noqa: E501 - 'human_review_required': 'human_review_required', # noqa: E501 - 'action': 'action', # noqa: E501 - 'webhook_action': 'webhook_action', # noqa: E501 + "id": "id", # noqa: E501 + "detector_id": "detector_id", # noqa: E501 + "detector_name": "detector_name", # noqa: E501 + "name": "name", # noqa: E501 + "condition": "condition", # noqa: E501 + "enabled": "enabled", # noqa: E501 + "snooze_time_enabled": "snooze_time_enabled", # noqa: E501 + "snooze_time_value": "snooze_time_value", # noqa: E501 + "snooze_time_unit": "snooze_time_unit", # noqa: E501 + "human_review_required": "human_review_required", # noqa: E501 + "action": "action", # noqa: E501 + "webhook_action": "webhook_action", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 - 'detector_id', # noqa: E501 - 'detector_name', # noqa: E501 + "id", # noqa: E501 + "detector_id", # noqa: E501 + "detector_name", # noqa: E501 } _composed_schemas = {} @@ -196,17 +224,18 @@ def _from_openapi_data(cls, id, detector_id, detector_name, name, condition, *ar webhook_action ([WebhookAction]): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -227,22 +256,24 @@ def _from_openapi_data(cls, id, detector_id, detector_name, name, condition, *ar self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -292,15 +323,16 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookAction]): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -318,13 +350,17 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/rule_request.py b/generated/groundlight_openapi_client/model/rule_request.py index 0bf2e262..8fdf8fe1 100644 --- a/generated/groundlight_openapi_client/model/rule_request.py +++ b/generated/groundlight_openapi_client/model/rule_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,7 +24,7 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError @@ -36,11 +35,12 @@ def lazy_import(): from groundlight_openapi_client.model.condition_request import ConditionRequest from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum from groundlight_openapi_client.model.webhook_action_request import WebhookActionRequest - globals()['Action'] = Action - globals()['ActionList'] = ActionList - globals()['ConditionRequest'] = ConditionRequest - globals()['SnoozeTimeUnitEnum'] = SnoozeTimeUnitEnum - globals()['WebhookActionRequest'] = WebhookActionRequest + + globals()["Action"] = Action + globals()["ActionList"] = ActionList + globals()["ConditionRequest"] = ConditionRequest + globals()["SnoozeTimeUnitEnum"] = SnoozeTimeUnitEnum + globals()["WebhookActionRequest"] = WebhookActionRequest class RuleRequest(ModelNormal): @@ -67,16 +67,15 @@ class RuleRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 44, - 'min_length': 1, + ("name",): { + "max_length": 44, + "min_length": 1, }, - ('snooze_time_value',): { - 'inclusive_minimum': 0, + ("snooze_time_value",): { + "inclusive_minimum": 0, }, } @@ -87,7 +86,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -103,36 +112,54 @@ def openapi_types(): """ lazy_import() return { - 'name': (str,), # noqa: E501 - 'condition': (ConditionRequest,), # noqa: E501 - 'enabled': (bool,), # noqa: E501 - 'snooze_time_enabled': (bool,), # noqa: E501 - 'snooze_time_value': (int,), # noqa: E501 - 'snooze_time_unit': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'human_review_required': (bool,), # noqa: E501 - 'action': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'webhook_action': ([WebhookActionRequest],), # noqa: E501 + "name": (str,), # noqa: E501 + "condition": (ConditionRequest,), # noqa: E501 + "enabled": (bool,), # noqa: E501 + "snooze_time_enabled": (bool,), # noqa: E501 + "snooze_time_value": (int,), # noqa: E501 + "snooze_time_unit": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "human_review_required": (bool,), # noqa: E501 + "action": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "webhook_action": ([WebhookActionRequest],), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'condition': 'condition', # noqa: E501 - 'enabled': 'enabled', # noqa: E501 - 'snooze_time_enabled': 'snooze_time_enabled', # noqa: E501 - 'snooze_time_value': 'snooze_time_value', # noqa: E501 - 'snooze_time_unit': 'snooze_time_unit', # noqa: E501 - 'human_review_required': 'human_review_required', # noqa: E501 - 'action': 'action', # noqa: E501 - 'webhook_action': 'webhook_action', # noqa: E501 + "name": "name", # noqa: E501 + "condition": "condition", # noqa: E501 + "enabled": "enabled", # noqa: E501 + "snooze_time_enabled": "snooze_time_enabled", # noqa: E501 + "snooze_time_value": "snooze_time_value", # noqa: E501 + "snooze_time_unit": "snooze_time_unit", # noqa: E501 + "human_review_required": "human_review_required", # noqa: E501 + "action": "action", # noqa: E501 + "webhook_action": "webhook_action", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -185,17 +212,18 @@ def _from_openapi_data(cls, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookActionRequest]): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -213,22 +241,24 @@ def _from_openapi_data(cls, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -279,15 +309,16 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 webhook_action ([WebhookActionRequest]): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -305,13 +336,17 @@ def __init__(self, name, condition, *args, **kwargs): # noqa: E501 self.name = name self.condition = condition for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py b/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py index 672227fc..f5586bb6 100644 --- a/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py +++ b/generated/groundlight_openapi_client/model/snooze_time_unit_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class SnoozeTimeUnitEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,16 +50,15 @@ class SnoozeTimeUnitEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'DAYS': "DAYS", - 'HOURS': "HOURS", - 'MINUTES': "MINUTES", - 'SECONDS': "SECONDS", + ("value",): { + "DAYS": "DAYS", + "HOURS": "HOURS", + "MINUTES": "MINUTES", + "SECONDS": "SECONDS", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -78,14 +75,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -93,12 +89,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -144,10 +140,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -158,14 +154,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -182,7 +179,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -234,12 +232,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -250,14 +248,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -274,7 +273,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/source.py b/generated/groundlight_openapi_client/model/source.py index 44d234b9..b9c247c4 100644 --- a/generated/groundlight_openapi_client/model/source.py +++ b/generated/groundlight_openapi_client/model/source.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class Source(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,21 +50,20 @@ class Source(ModelSimple): """ allowed_values = { - ('value',): { - 'STILL_PROCESSING': "STILL_PROCESSING", - 'CLOUD': "CLOUD", - 'USER': "USER", - 'CLOUD_ENSEMBLE': "CLOUD_ENSEMBLE", - 'ALGORITHM': "ALGORITHM", - 'AI_CLOUD': "AI_CLOUD", - 'AI_CLOUD_ENSEMBLE': "AI_CLOUD_ENSEMBLE", - 'HUMAN_AI_CLOUD_ENSEMBLE': "HUMAN_AI_CLOUD_ENSEMBLE", - 'EDGE': "EDGE", + ("value",): { + "STILL_PROCESSING": "STILL_PROCESSING", + "CLOUD": "CLOUD", + "USER": "USER", + "CLOUD_ENSEMBLE": "CLOUD_ENSEMBLE", + "ALGORITHM": "ALGORITHM", + "AI_CLOUD": "AI_CLOUD", + "AI_CLOUD_ENSEMBLE": "AI_CLOUD_ENSEMBLE", + "HUMAN_AI_CLOUD_ENSEMBLE": "HUMAN_AI_CLOUD_ENSEMBLE", + "EDGE": "EDGE", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -83,14 +80,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -98,12 +94,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -149,10 +145,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -163,14 +159,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -187,7 +184,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -239,12 +237,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -255,14 +253,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -279,7 +278,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/source_enum.py b/generated/groundlight_openapi_client/model/source_enum.py index ca4db25f..e8e5a047 100644 --- a/generated/groundlight_openapi_client/model/source_enum.py +++ b/generated/groundlight_openapi_client/model/source_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class SourceEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,23 +50,22 @@ class SourceEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'INITIAL_PLACEHOLDER': "INITIAL_PLACEHOLDER", - 'CLOUD': "CLOUD", - 'CUST': "CUST", - 'HUMAN_CLOUD_ENSEMBLE': "HUMAN_CLOUD_ENSEMBLE", - 'AI_CLOUD': "AI_CLOUD", - 'AI_CLOUD_ENSEMBLE': "AI_CLOUD_ENSEMBLE", - 'HUMAN_AI_CLOUD_ENSEMBLE': "HUMAN_AI_CLOUD_ENSEMBLE", - 'ALG': "ALG", - 'ALG_REC': "ALG_REC", - 'ALG_UNCLEAR': "ALG_UNCLEAR", - 'EDGE': "EDGE", + ("value",): { + "INITIAL_PLACEHOLDER": "INITIAL_PLACEHOLDER", + "CLOUD": "CLOUD", + "CUST": "CUST", + "HUMAN_CLOUD_ENSEMBLE": "HUMAN_CLOUD_ENSEMBLE", + "AI_CLOUD": "AI_CLOUD", + "AI_CLOUD_ENSEMBLE": "AI_CLOUD_ENSEMBLE", + "HUMAN_AI_CLOUD_ENSEMBLE": "HUMAN_AI_CLOUD_ENSEMBLE", + "ALG": "ALG", + "ALG_REC": "ALG_REC", + "ALG_UNCLEAR": "ALG_UNCLEAR", + "EDGE": "EDGE", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -85,14 +82,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -100,12 +96,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -151,10 +147,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -165,14 +161,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -189,7 +186,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -241,12 +239,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -257,14 +255,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -281,7 +280,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/status_enum.py b/generated/groundlight_openapi_client/model/status_enum.py index d6a1f357..b41c2871 100644 --- a/generated/groundlight_openapi_client/model/status_enum.py +++ b/generated/groundlight_openapi_client/model/status_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class StatusEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,14 +50,13 @@ class StatusEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'ON': "ON", - 'OFF': "OFF", + ("value",): { + "ON": "ON", + "OFF": "OFF", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -76,14 +73,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -91,12 +87,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -142,10 +138,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -156,14 +152,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -180,7 +177,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -232,12 +230,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -248,14 +246,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -272,7 +271,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/text_mode_configuration.py b/generated/groundlight_openapi_client/model/text_mode_configuration.py index 5a6990f0..ee4c4e73 100644 --- a/generated/groundlight_openapi_client/model/text_mode_configuration.py +++ b/generated/groundlight_openapi_client/model/text_mode_configuration.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class TextModeConfiguration(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,13 +53,12 @@ class TextModeConfiguration(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('value_max_length',): { - 'inclusive_maximum': 250, - 'inclusive_minimum': 1, + ("value_max_length",): { + "inclusive_maximum": 250, + "inclusive_minimum": 1, }, } @@ -71,7 +68,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -86,20 +93,18 @@ def openapi_types(): and the value is attribute type. """ return { - 'value_max_length': (int,), # noqa: E501 + "value_max_length": (int,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'value_max_length': 'value_max_length', # noqa: E501 + "value_max_length": "value_max_length", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -142,17 +147,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 value_max_length (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -168,22 +174,24 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -224,15 +232,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 value_max_length (int): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -248,13 +257,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._visited_composed_classes = _visited_composed_classes + (self.__class__,) for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/text_recognition_result.py b/generated/groundlight_openapi_client/model/text_recognition_result.py index 97b87183..0e769567 100644 --- a/generated/groundlight_openapi_client/model/text_recognition_result.py +++ b/generated/groundlight_openapi_client/model/text_recognition_result.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class TextRecognitionResult(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -56,15 +54,15 @@ class TextRecognitionResult(ModelNormal): """ allowed_values = { - ('result_type',): { - 'TEXT_RECOGNITION': "text_recognition", + ("result_type",): { + "TEXT_RECOGNITION": "text_recognition", }, } validations = { - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -74,7 +72,17 @@ def additional_properties_type(): This must be a method because a model may have properties that are of type self, this must run after the class is loaded """ - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -89,30 +97,34 @@ def openapi_types(): and the value is attribute type. """ return { - 'text': (str, none_type,), # noqa: E501 - 'truncated': (bool,), # noqa: E501 - 'confidence': (float, none_type,), # noqa: E501 - 'source': (str,), # noqa: E501 - 'result_type': (str,), # noqa: E501 - 'from_edge': (bool,), # noqa: E501 + "text": ( + str, + none_type, + ), # noqa: E501 + "truncated": (bool,), # noqa: E501 + "confidence": ( + float, + none_type, + ), # noqa: E501 + "source": (str,), # noqa: E501 + "result_type": (str,), # noqa: E501 + "from_edge": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'text': 'text', # noqa: E501 - 'truncated': 'truncated', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'source': 'source', # noqa: E501 - 'result_type': 'result_type', # noqa: E501 - 'from_edge': 'from_edge', # noqa: E501 + "text": "text", # noqa: E501 + "truncated": "truncated", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "source": "source", # noqa: E501 + "result_type": "result_type", # noqa: E501 + "from_edge": "from_edge", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -162,17 +174,18 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -190,22 +203,24 @@ def _from_openapi_data(cls, text, truncated, *args, **kwargs): # noqa: E501 self.text = text self.truncated = truncated for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -253,15 +268,16 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 from_edge (bool): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -279,13 +295,17 @@ def __init__(self, text, truncated, *args, **kwargs): # noqa: E501 self.text = text self.truncated = truncated for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/verb_enum.py b/generated/groundlight_openapi_client/model/verb_enum.py index 3b2acb15..789dd77c 100644 --- a/generated/groundlight_openapi_client/model/verb_enum.py +++ b/generated/groundlight_openapi_client/model/verb_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,12 +24,11 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError - class VerbEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,17 +50,16 @@ class VerbEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'ANSWERED_CONSECUTIVELY': "ANSWERED_CONSECUTIVELY", - 'ANSWERED_WITHIN_TIME': "ANSWERED_WITHIN_TIME", - 'CHANGED_TO': "CHANGED_TO", - 'NO_CHANGE': "NO_CHANGE", - 'NO_QUERIES': "NO_QUERIES", + ("value",): { + "ANSWERED_CONSECUTIVELY": "ANSWERED_CONSECUTIVELY", + "ANSWERED_WITHIN_TIME": "ANSWERED_WITHIN_TIME", + "CHANGED_TO": "CHANGED_TO", + "NO_CHANGE": "NO_CHANGE", + "NO_QUERIES": "NO_QUERIES", }, } - validations = { - } + validations = {} additional_properties_type = None @@ -79,14 +76,13 @@ def openapi_types(): and the value is attribute type. """ return { - 'value': (str,), + "value": (str,), } @cached_property def discriminator(): return None - attribute_map = {} read_only_vars = set() @@ -94,12 +90,12 @@ def discriminator(): _composed_schemas = None required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -145,10 +141,10 @@ def __init__(self, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -159,14 +155,15 @@ def __init__(self, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -183,7 +180,8 @@ def __init__(self, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), @@ -235,12 +233,12 @@ def _from_openapi_data(cls, *args, **kwargs): _visited_composed_classes = (Animal,) """ # required up here when default value is not given - _path_to_item = kwargs.pop('_path_to_item', ()) + _path_to_item = kwargs.pop("_path_to_item", ()) self = super(OpenApiModel, cls).__new__(cls) - if 'value' in kwargs: - value = kwargs.pop('value') + if "value" in kwargs: + value = kwargs.pop("value") elif args: args = list(args) value = args.pop(0) @@ -251,14 +249,15 @@ def _from_openapi_data(cls, *args, **kwargs): valid_classes=(self.__class__,), ) - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -275,7 +274,8 @@ def _from_openapi_data(cls, *args, **kwargs): self.value = value if kwargs: raise ApiTypeError( - "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % ( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( kwargs, self.__class__.__name__, ), diff --git a/generated/groundlight_openapi_client/model/webhook_action.py b/generated/groundlight_openapi_client/model/webhook_action.py index b230804e..33f70f3c 100644 --- a/generated/groundlight_openapi_client/model/webhook_action.py +++ b/generated/groundlight_openapi_client/model/webhook_action.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.payload_template import PayloadTemplate - globals()['PayloadTemplate'] = PayloadTemplate + + globals()["PayloadTemplate"] = PayloadTemplate class WebhookAction(ModelNormal): @@ -59,12 +59,11 @@ class WebhookAction(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('url',): { - 'max_length': 200, + ("url",): { + "max_length": 200, }, } @@ -75,7 +74,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -91,30 +100,44 @@ def openapi_types(): """ lazy_import() return { - 'url': (str,), # noqa: E501 - 'include_image': (bool,), # noqa: E501 - 'payload_template': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'last_message_failed': (bool,), # noqa: E501 - 'last_failure_error': (str, none_type,), # noqa: E501 - 'last_failed_at': (datetime, none_type,), # noqa: E501 + "url": (str,), # noqa: E501 + "include_image": (bool,), # noqa: E501 + "payload_template": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "last_message_failed": (bool,), # noqa: E501 + "last_failure_error": ( + str, + none_type, + ), # noqa: E501 + "last_failed_at": ( + datetime, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'url': 'url', # noqa: E501 - 'include_image': 'include_image', # noqa: E501 - 'payload_template': 'payload_template', # noqa: E501 - 'last_message_failed': 'last_message_failed', # noqa: E501 - 'last_failure_error': 'last_failure_error', # noqa: E501 - 'last_failed_at': 'last_failed_at', # noqa: E501 + "url": "url", # noqa: E501 + "include_image": "include_image", # noqa: E501 + "payload_template": "payload_template", # noqa: E501 + "last_message_failed": "last_message_failed", # noqa: E501 + "last_failure_error": "last_failure_error", # noqa: E501 + "last_failed_at": "last_failed_at", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -164,17 +187,18 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -191,22 +215,24 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -254,15 +280,16 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -279,13 +306,17 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model/webhook_action_request.py b/generated/groundlight_openapi_client/model/webhook_action_request.py index 39ba2c85..cd98a99b 100644 --- a/generated/groundlight_openapi_client/model/webhook_action_request.py +++ b/generated/groundlight_openapi_client/model/webhook_action_request.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import re # noqa: F401 import sys # noqa: F401 @@ -25,14 +24,15 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel + OpenApiModel, ) from groundlight_openapi_client.exceptions import ApiAttributeError def lazy_import(): from groundlight_openapi_client.model.payload_template_request import PayloadTemplateRequest - globals()['PayloadTemplateRequest'] = PayloadTemplateRequest + + globals()["PayloadTemplateRequest"] = PayloadTemplateRequest class WebhookActionRequest(ModelNormal): @@ -59,13 +59,12 @@ class WebhookActionRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('url',): { - 'max_length': 200, - 'min_length': 1, + ("url",): { + "max_length": 200, + "min_length": 1, }, } @@ -76,7 +75,17 @@ def additional_properties_type(): of type self, this must run after the class is loaded """ lazy_import() - return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + return ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ) # noqa: E501 _nullable = False @@ -92,30 +101,44 @@ def openapi_types(): """ lazy_import() return { - 'url': (str,), # noqa: E501 - 'include_image': (bool,), # noqa: E501 - 'payload_template': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'last_message_failed': (bool,), # noqa: E501 - 'last_failure_error': (str, none_type,), # noqa: E501 - 'last_failed_at': (datetime, none_type,), # noqa: E501 + "url": (str,), # noqa: E501 + "include_image": (bool,), # noqa: E501 + "payload_template": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "last_message_failed": (bool,), # noqa: E501 + "last_failure_error": ( + str, + none_type, + ), # noqa: E501 + "last_failed_at": ( + datetime, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'url': 'url', # noqa: E501 - 'include_image': 'include_image', # noqa: E501 - 'payload_template': 'payload_template', # noqa: E501 - 'last_message_failed': 'last_message_failed', # noqa: E501 - 'last_failure_error': 'last_failure_error', # noqa: E501 - 'last_failed_at': 'last_failed_at', # noqa: E501 + "url": "url", # noqa: E501 + "include_image": "include_image", # noqa: E501 + "payload_template": "payload_template", # noqa: E501 + "last_message_failed": "last_message_failed", # noqa: E501 + "last_failure_error": "last_failure_error", # noqa: E501 + "last_failed_at": "last_failed_at", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -165,17 +188,18 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) self = super(OpenApiModel, cls).__new__(cls) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -192,22 +216,24 @@ def _from_openapi_data(cls, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) return self required_properties = set([ - '_data_store', - '_check_type', - '_spec_property_naming', - '_path_to_item', - '_configuration', - '_visited_composed_classes', + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", ]) @convert_js_args_to_python_args @@ -255,15 +281,16 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 last_failed_at (datetime, none_type): [optional] # noqa: E501 """ - _check_type = kwargs.pop('_check_type', True) - _spec_property_naming = kwargs.pop('_spec_property_naming', False) - _path_to_item = kwargs.pop('_path_to_item', ()) - _configuration = kwargs.pop('_configuration', None) - _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _path_to_item = kwargs.pop("_path_to_item", ()) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) if args: raise ApiTypeError( - "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( args, self.__class__.__name__, ), @@ -280,13 +307,17 @@ def __init__(self, url, *args, **kwargs): # noqa: E501 self.url = url for var_name, var_value in kwargs.items(): - if var_name not in self.attribute_map and \ - self._configuration is not None and \ - self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + if ( + var_name not in self.attribute_map + and self._configuration is not None + and self._configuration.discard_unknown_keys + and self.additional_properties_type is None + ): # discard variable. continue setattr(self, var_name, var_value) if var_name in self.read_only_vars: - raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " - f"class with read only attributes.") + raise ApiAttributeError( + f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate " + "class with read only attributes." + ) diff --git a/generated/groundlight_openapi_client/model_utils.py b/generated/groundlight_openapi_client/model_utils.py index a1c7d7a8..cf7bd6d4 100644 --- a/generated/groundlight_openapi_client/model_utils.py +++ b/generated/groundlight_openapi_client/model_utils.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - from datetime import date, datetime # noqa: F401 from copy import deepcopy import inspect @@ -33,6 +32,7 @@ def convert_js_args_to_python_args(fn): from functools import wraps + @wraps(fn) def wrapped_init(_self, *args, **kwargs): """ @@ -40,10 +40,11 @@ def wrapped_init(_self, *args, **kwargs): parameter of a class method. During generation, `self` attributes are mapped to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. """ - spec_property_naming = kwargs.get('_spec_property_naming', False) + spec_property_naming = kwargs.get("_spec_property_naming", False) if spec_property_naming: kwargs = change_keys_js_to_python(kwargs, _self if isinstance(_self, type) else _self.__class__) return fn(_self, *args, **kwargs) + return wrapped_init @@ -51,7 +52,7 @@ class cached_property(object): # this caches the result of the function call for fn with no inputs # use this as a decorator on function methods that you want converted # into cached properties - result_key = '_results' + result_key = "_results" def __init__(self, fn): self._fn = fn @@ -67,6 +68,7 @@ def __get__(self, instance, cls=None): PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) + def allows_single_value_input(cls): """ This function returns True if the input composed schema model or any @@ -80,17 +82,15 @@ def allows_single_value_input(cls): - null TODO: lru_cache this """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): + if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: return True elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) + return any(allows_single_value_input(c) for c in cls._composed_schemas["oneOf"]) return False + def composed_model_input_classes(cls): """ This function returns a list of the possible models that can be accepted as @@ -105,11 +105,11 @@ def composed_model_input_classes(cls): else: return get_discriminated_classes(cls) elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: + if not cls._composed_schemas["oneOf"]: return [] if cls.discriminator is None: input_classes = [] - for c in cls._composed_schemas['oneOf']: + for c in cls._composed_schemas["oneOf"]: input_classes.extend(composed_model_input_classes(c)) return input_classes else: @@ -131,46 +131,28 @@ def set_attribute(self, name, value): if name in self.openapi_types: required_types_mixed = self.openapi_types[name] elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) + raise ApiAttributeError("{0} has no attribute '{1}'".format(type(self).__name__, name), path_to_item) elif self.additional_properties_type is not None: required_types_mixed = self.additional_properties_type if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) + error_msg = type_error_message(var_name=name, var_value=name, valid_classes=(str,), key_type=True) + raise ApiTypeError(error_msg, path_to_item=path_to_item, valid_classes=(str,), key_type=True) if self._check_type: value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), value, - self._configuration + required_types_mixed, + path_to_item, + self._spec_property_naming, + self._check_type, + configuration=self._configuration, ) - self.__dict__['_data_store'][name] = value + if (name,) in self.allowed_values: + check_allowed_values(self.allowed_values, (name,), value) + if (name,) in self.validations: + check_validations(self.validations, (name,), value, self._configuration) + self.__dict__["_data_store"][name] = value def __repr__(self): """For `print` and `pprint`""" @@ -207,7 +189,6 @@ def __deepcopy__(self, memo): setattr(new_inst, k, deepcopy(v, memo)) return new_inst - def __new__(cls, *args, **kwargs): # this function uses the discriminator to # pick a new schema/class to instantiate because a discriminator @@ -224,12 +205,8 @@ def __new__(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -259,28 +236,24 @@ def __new__(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get("_path_to_item", ()) + disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -305,13 +278,11 @@ def __new__(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get("oneOf", ()) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = super(OpenApiModel, cls).__new__(cls) @@ -326,7 +297,6 @@ def __new__(cls, *args, **kwargs): return new_inst - @classmethod @convert_js_args_to_python_args def _new_from_openapi_data(cls, *args, **kwargs): @@ -345,12 +315,8 @@ def _new_from_openapi_data(cls, *args, **kwargs): oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): + visited_composed_classes = kwargs.get("_visited_composed_classes", ()) + if cls.discriminator is None or cls in visited_composed_classes: # Use case 1: this openapi schema (cls) does not have a discriminator # Use case 2: we have already visited this class before and are sure that we # want to instantiate it this time. We have visited this class deserializing @@ -380,28 +346,24 @@ def _new_from_openapi_data(cls, *args, **kwargs): discr_value = kwargs[discr_propertyname_py] else: # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) + path_to_item = kwargs.get("_path_to_item", ()) raise ApiValueError( "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) + "The discriminator property '%s' is missing at path: %s" % (discr_propertyname_js, path_to_item) ) # Implementation note: the last argument to get_discriminator_class # is a list of visited classes. get_discriminator_class may recursively # call itself and update the list of visited classes, and the initial # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) + new_cls = get_discriminator_class(cls, discr_propertyname_py, discr_value, []) if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) + path_to_item = kwargs.get("_path_to_item", ()) + disc_prop_value = kwargs.get(discr_propertyname_js, kwargs.get(discr_propertyname_py)) raise ApiValueError( "Cannot deserialize input data due to invalid discriminator " "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) + "property '%s'='%s' at path: %s" % (discr_propertyname_js, disc_prop_value, path_to_item) ) if new_cls in visited_composed_classes: @@ -426,18 +388,15 @@ def _new_from_openapi_data(cls, *args, **kwargs): # Build a list containing all oneOf and anyOf descendants. oneof_anyof_classes = None if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) + oneof_anyof_classes = cls._composed_schemas.get("oneOf", ()) + cls._composed_schemas.get("anyOf", ()) oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) + kwargs["_visited_composed_classes"] = visited_composed_classes + (cls,) - if cls._composed_schemas.get('allOf') and oneof_anyof_child: + if cls._composed_schemas.get("allOf") and oneof_anyof_child: # Validate that we can make self because when we make the # new_cls it will not include the allOf validations in self self_inst = cls._from_openapi_data(*args, **kwargs) - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) return new_inst @@ -459,7 +418,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -467,9 +426,7 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), [e for e in [self._path_to_item, name] if e] ) def __contains__(self, name): @@ -477,7 +434,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_str(self): """Returns the string representation of the model""" @@ -488,8 +445,8 @@ def __eq__(self, other): if not isinstance(other, self.__class__): return False - this_val = self._data_store['value'] - that_val = other._data_store['value'] + this_val = self._data_store["value"] + that_val = other._data_store["value"] types = set() types.add(this_val.__class__) types.add(that_val.__class__) @@ -514,7 +471,7 @@ def get(self, name, default=None): if name in self.required_properties: return self.__dict__[name] - return self.__dict__['_data_store'].get(name, default) + return self.__dict__["_data_store"].get(name, default) def __getitem__(self, name): """get the value of an attribute using square-bracket notation: `instance[attr]`""" @@ -522,9 +479,7 @@ def __getitem__(self, name): return self.get(name) raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), [e for e in [self._path_to_item, name] if e] ) def __contains__(self, name): @@ -532,7 +487,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - return name in self.__dict__['_data_store'] + return name in self.__dict__["_data_store"] def to_dict(self): """Returns the model properties as a dict""" @@ -617,9 +572,8 @@ def __setitem__(self, name, value): """ if name not in self.openapi_types: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) # attribute must be set on self and composed instances self.set_attribute(name, value) @@ -627,7 +581,7 @@ def __setitem__(self, name, value): setattr(model_instance, name, value) if name not in self._var_name_to_model_instances: # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] + self.__dict__["_var_name_to_model_instances"][name] = self._composed_instances + [self] return None __unset_attribute_value__ = object() @@ -660,7 +614,7 @@ def get(self, name, default=None): "Values stored for property {0} in {1} differ when looking " "at self and self's composed instances. All values must be " "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] + [e for e in [self._path_to_item, name] if e], ) def __getitem__(self, name): @@ -668,9 +622,8 @@ def __getitem__(self, name): value = self.get(name, self.__unset_attribute_value__) if value is self.__unset_attribute_value__: raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] + "{0} has no attribute '{1}'".format(type(self).__name__, name), + [e for e in [self._path_to_item, name] if e], ) return value @@ -680,8 +633,7 @@ def __contains__(self, name): if name in self.required_properties: return name in self.__dict__ - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) + model_instances = self._var_name_to_model_instances.get(name, self._additional_properties_model_instances) if model_instances: for model_instance in model_instances: @@ -720,7 +672,7 @@ def __eq__(self, other): ModelComposed: 0, ModelNormal: 1, ModelSimple: 2, - none_type: 3, # The type of 'None'. + none_type: 3, # The type of 'None'. list: 4, dict: 5, float: 6, @@ -729,7 +681,7 @@ def __eq__(self, other): datetime: 9, date: 10, str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. + file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. } # these are used to limit what type conversions we try to do @@ -738,7 +690,7 @@ def __eq__(self, other): UPCONVERSION_TYPE_PAIRS = ( (str, datetime), (str, date), - (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. + (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float. (list, ModelComposed), (dict, ModelComposed), (str, ModelComposed), @@ -785,7 +737,7 @@ def __eq__(self, other): (str, date), # (int, str), # (float, str), - (str, file_type) + (str, file_type), ), } @@ -842,41 +794,22 @@ def check_allowed_values(allowed_values, input_variable_path, input_values): are checking to see if they are in allowed_values """ these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), + if isinstance(input_values, list) and not set(input_values).issubset(set(these_allowed_values)): + invalid_values = (", ".join(map(str, set(input_values) - set(these_allowed_values))),) raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) + "Invalid values for `%s` [%s], must be a subset of [%s]" + % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) + elif isinstance(input_values, dict) and not set(input_values.keys()).issubset(set(these_allowed_values)): + invalid_values = ", ".join(map(str, set(input_values.keys()) - set(these_allowed_values))) raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) + "Invalid keys in `%s` [%s], must be a subset of [%s]" + % (input_variable_path[0], invalid_values, ", ".join(map(str, these_allowed_values))) ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): + elif not isinstance(input_values, (list, dict)) and input_values not in these_allowed_values: raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) + "Invalid value for `%s` (%s), must be one of %s" + % (input_variable_path[0], input_values, these_allowed_values) ) @@ -890,14 +823,14 @@ def is_json_validation_enabled(schema_keyword, configuration=None): configuration (Configuration): the configuration class. """ - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) + return ( + configuration is None + or not hasattr(configuration, "_disabled_client_side_validations") + or schema_keyword not in configuration._disabled_client_side_validations + ) -def check_validations( - validations, input_variable_path, input_values, - configuration=None): +def check_validations(validations, input_variable_path, input_values, configuration=None): """Raises an exception if the input_values are invalid Args: @@ -912,66 +845,60 @@ def check_validations( return current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): + if ( + is_json_validation_enabled("multipleOf", configuration) + and "multiple_of" in current_validations + and isinstance(input_values, (int, float)) + and not (float(input_values) / current_validations["multiple_of"]).is_integer() + ): # Note 'multipleOf' will be as good as the floating point arithmetic. raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) + "Invalid value for `%s`, value must be a multiple of `%s`" + % (input_variable_path[0], current_validations["multiple_of"]) ) - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): + if ( + is_json_validation_enabled("maxLength", configuration) + and "max_length" in current_validations + and len(input_values) > current_validations["max_length"] + ): raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) + "Invalid value for `%s`, length must be less than or equal to `%s`" + % (input_variable_path[0], current_validations["max_length"]) ) - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): + if ( + is_json_validation_enabled("minLength", configuration) + and "min_length" in current_validations + and len(input_values) < current_validations["min_length"] + ): raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) + "Invalid value for `%s`, length must be greater than or equal to `%s`" + % (input_variable_path[0], current_validations["min_length"]) ) - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): + if ( + is_json_validation_enabled("maxItems", configuration) + and "max_items" in current_validations + and len(input_values) > current_validations["max_items"] + ): raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) + "Invalid value for `%s`, number of items must be less than or equal to `%s`" + % (input_variable_path[0], current_validations["max_items"]) ) - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): + if ( + is_json_validation_enabled("minItems", configuration) + and "min_items" in current_validations + and len(input_values) < current_validations["min_items"] + ): raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) + "Invalid value for `%s`, number of items must be greater than or equal to `%s`" + % (input_variable_path[0], current_validations["min_items"]) ) - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): + items = ("exclusive_maximum", "inclusive_maximum", "exclusive_minimum", "inclusive_minimum") + if any(item in current_validations for item in items): if isinstance(input_values, list): max_val = max(input_values) min_val = min(input_values) @@ -982,57 +909,55 @@ def check_validations( max_val = input_values min_val = input_values - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): + if ( + is_json_validation_enabled("exclusiveMaximum", configuration) + and "exclusive_maximum" in current_validations + and max_val >= current_validations["exclusive_maximum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value less than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): + if ( + is_json_validation_enabled("maximum", configuration) + and "inclusive_maximum" in current_validations + and max_val > current_validations["inclusive_maximum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) + "Invalid value for `%s`, must be a value less than or equal to `%s`" + % (input_variable_path[0], current_validations["inclusive_maximum"]) ) - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): + if ( + is_json_validation_enabled("exclusiveMinimum", configuration) + and "exclusive_minimum" in current_validations + and min_val <= current_validations["exclusive_minimum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) + "Invalid value for `%s`, must be a value greater than `%s`" + % (input_variable_path[0], current_validations["exclusive_maximum"]) ) - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): + if ( + is_json_validation_enabled("minimum", configuration) + and "inclusive_minimum" in current_validations + and min_val < current_validations["inclusive_minimum"] + ): raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) + "Invalid value for `%s`, must be a value greater than or equal to `%s`" + % (input_variable_path[0], current_validations["inclusive_minimum"]) ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): + flags = current_validations.get("regex", {}).get("flags", 0) + if ( + is_json_validation_enabled("pattern", configuration) + and "regex" in current_validations + and not re.search(current_validations["regex"]["pattern"], input_values, flags=flags) + ): err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) + input_variable_path[0], + current_validations["regex"]["pattern"], + ) if flags != 0: # Don't print the regex flags if the flags are not # specified in the OAS document. @@ -1057,28 +982,21 @@ def index_getter(class_or_instance): return COERCION_INDEX_BY_TYPE[list] elif isinstance(class_or_instance, dict): return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelComposed): return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelNormal): return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): + elif inspect.isclass(class_or_instance) and issubclass(class_or_instance, ModelSimple): return COERCION_INDEX_BY_TYPE[ModelSimple] elif class_or_instance in COERCION_INDEX_BY_TYPE: return COERCION_INDEX_BY_TYPE[class_or_instance] raise ApiValueError("Unsupported type: %s" % class_or_instance) - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) + sorted_types = sorted(required_types, key=lambda class_or_instance: index_getter(class_or_instance)) return sorted_types -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): +def remove_uncoercible(required_types_classes, current_item, spec_property_naming, must_convert=True): """Only keeps the type conversions that are possible Args: @@ -1123,6 +1041,7 @@ def remove_uncoercible(required_types_classes, current_item, spec_property_namin results_classes.append(required_type_class) return results_classes + def get_discriminated_classes(cls): """ Returns all the classes that a discriminator converts to @@ -1133,7 +1052,7 @@ def get_discriminated_classes(cls): if is_type_nullable(cls): possible_classes.append(cls) for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: + if hasattr(discr_cls, "discriminator") and discr_cls.discriminator is not None: possible_classes.extend(get_discriminated_classes(discr_cls)) else: possible_classes.append(discr_cls) @@ -1145,7 +1064,7 @@ def get_possible_classes(cls, from_server_context): possible_classes = [cls] if from_server_context: return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: + if hasattr(cls, "discriminator") and cls.discriminator is not None: possible_classes = [] possible_classes.extend(get_discriminated_classes(cls)) elif issubclass(cls, ModelComposed): @@ -1201,11 +1120,10 @@ def change_keys_js_to_python(input_dict, model_class): document). """ - if getattr(model_class, 'attribute_map', None) is None: + if getattr(model_class, "attribute_map", None) is None: return input_dict output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} + reversed_attr_map = {value: key for key, value in model_class.attribute_map.items()} for javascript_key, value in input_dict.items(): python_key = reversed_attr_map.get(javascript_key) if python_key is None: @@ -1218,17 +1136,9 @@ def change_keys_js_to_python(input_dict, model_class): def get_type_error(var_value, path_to_item, valid_classes, key_type=False): error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type + var_name=path_to_item[-1], var_value=var_value, valid_classes=valid_classes, key_type=key_type ) + return ApiTypeError(error_msg, path_to_item=path_to_item, valid_classes=valid_classes, key_type=key_type) def deserialize_primitive(data, klass, path_to_item): @@ -1253,11 +1163,11 @@ def deserialize_primitive(data, klass, path_to_item): # The string should be in iso8601 datetime format. parsed_datetime = parse(data) date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 + parsed_datetime.hour == 0 + and parsed_datetime.minute == 0 + and parsed_datetime.second == 0 + and parsed_datetime.tzinfo is None + and 8 <= len(data) <= 10 ) if date_only: raise ValueError("This is a date, not a datetime") @@ -1271,21 +1181,17 @@ def deserialize_primitive(data, klass, path_to_item): if isinstance(data, str) and klass == float: if str(converted_value) != data: # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') + raise ValueError("This is not a float") return converted_value except (OverflowError, ValueError) as ex: # parse can raise OverflowError raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item + "{0}Failed to parse {1} as {2}".format(additional_message, repr(data), klass.__name__), + path_to_item=path_to_item, ) from ex -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): +def get_discriminator_class(model_class, discr_name, discr_value, cls_visited): """Returns the child class specified by the discriminator. Args: @@ -1321,22 +1227,21 @@ def get_discriminator_class(model_class, # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig # if we try to make BasquePig from mammal, we need to travel through # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) + descendant_classes = model_class._composed_schemas.get("oneOf", ()) + model_class._composed_schemas.get( + "anyOf", () + ) + ancestor_classes = model_class._composed_schemas.get("allOf", ()) possible_classes = descendant_classes + ancestor_classes for cls in possible_classes: # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) + if hasattr(cls, "discriminator") and cls.discriminator is not None: + used_model_class = get_discriminator_class(cls, discr_name, discr_value, cls_visited) if used_model_class is not None: return used_model_class return used_model_class -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): +def deserialize_model(model_data, model_class, path_to_item, check_type, configuration, spec_property_naming): """Deserializes model_data to model instance. Args: @@ -1360,10 +1265,12 @@ def deserialize_model(model_data, model_class, path_to_item, check_type, ApiKeyError """ - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) + kw_args = dict( + _check_type=check_type, + _path_to_item=path_to_item, + _configuration=configuration, + _spec_property_naming=spec_property_naming, + ) if issubclass(model_class, ModelSimple): return model_class._new_from_openapi_data(model_data, **kw_args) @@ -1399,23 +1306,29 @@ def deserialize_file(response_data, configuration, content_disposition=None): os.remove(path) if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition).group(1) + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition).group(1) path = os.path.join(os.path.dirname(path), filename) with open(path, "wb") as f: if isinstance(response_data, str): # change str to bytes so we can write it - response_data = response_data.encode('utf-8') + response_data = response_data.encode("utf-8") f.write(response_data) f = open(path, "rb") return f -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): +def attempt_convert_item( + input_value, + valid_classes, + path_to_item, + configuration, + spec_property_naming, + key_type=False, + must_convert=False, + check_type=True, +): """ Args: input_value (any): the data to convert @@ -1440,24 +1353,21 @@ def attempt_convert_item(input_value, valid_classes, path_to_item, ApiKeyError """ valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) + valid_classes_coercible = remove_uncoercible(valid_classes_ordered, input_value, spec_property_naming) if not valid_classes_coercible or key_type: # we do not handle keytype errors, json will take care # of this for us if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) + raise get_type_error(input_value, path_to_item, valid_classes, key_type=key_type) for valid_class in valid_classes_coercible: try: if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) + return deserialize_model( + input_value, valid_class, path_to_item, check_type, configuration, spec_property_naming + ) elif valid_class == file_type: return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) + return deserialize_primitive(input_value, valid_class, path_to_item) except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: if must_convert: raise conversion_exc @@ -1489,10 +1399,12 @@ def is_type_nullable(input_type): return True if issubclass(input_type, ModelComposed): # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): return True + for t in input_type._composed_schemas.get("oneOf", ()): + if is_type_nullable(t): + return True + for t in input_type._composed_schemas.get("anyOf", ()): + if is_type_nullable(t): + return True return False @@ -1506,13 +1418,20 @@ def is_valid_type(input_class_simple, valid_classes): Returns: bool """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): + if issubclass(input_class_simple, OpenApiModel) and valid_classes == ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ): return True valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): + if not valid_type and (issubclass(input_class_simple, OpenApiModel) or input_class_simple is none_type): for valid_class in valid_classes: if input_class_simple is none_type and is_type_nullable(valid_class): # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. @@ -1520,17 +1439,16 @@ def is_valid_type(input_class_simple, valid_classes): if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): continue discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) + discriminator_classes = valid_class.discriminator[discr_propertyname_py].values() valid_type = is_valid_type(input_class_simple, discriminator_classes) if valid_type: return True return valid_type -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): +def validate_and_convert_types( + input_value, required_types_mixed, path_to_item, spec_property_naming, _check_type, configuration=None +): """Raises a TypeError is there is a problem, otherwise returns value Args: @@ -1575,18 +1493,18 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=True, - check_type=_check_type + check_type=_check_type, ) return converted_instance else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) + raise get_type_error(input_value, path_to_item, valid_classes, key_type=False) # input_value's type is in valid_classes if len(valid_classes) > 1 and configuration: # there are valid classes which are not the current class valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) + valid_classes, input_value, spec_property_naming, must_convert=False + ) if valid_classes_coercible: converted_instance = attempt_convert_item( input_value, @@ -1596,7 +1514,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, spec_property_naming, key_type=False, must_convert=False, - check_type=_check_type + check_type=_check_type, ) return converted_instance @@ -1604,9 +1522,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, # all types are of the required types and there are no more inner # variables left to look at return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) + inner_required_types = child_req_types_by_current_type.get(type(input_value)) if inner_required_types is None: # for this type, there are not more inner variables left to look at return input_value @@ -1623,7 +1539,7 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) elif isinstance(input_value, dict): if input_value == {}: @@ -1633,15 +1549,14 @@ def validate_and_convert_types(input_value, required_types_mixed, path_to_item, inner_path = list(path_to_item) inner_path.append(inner_key) if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) + raise get_type_error(inner_key, inner_path, valid_classes, key_type=True) input_value[inner_key] = validate_and_convert_types( inner_val, inner_required_types, inner_path, spec_property_naming, _check_type, - configuration=configuration + configuration=configuration, ) return input_value @@ -1658,7 +1573,9 @@ def model_to_dict(model_instance, serialize=True): attribute_map """ result = {} - extract_item = lambda item: (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], '_data_store') else item + extract_item = lambda item: ( + (item[0], model_to_dict(item[1], serialize=serialize)) if hasattr(item[1], "_data_store") else item + ) model_instances = [model_instance] if model_instance._composed_schemas: @@ -1678,32 +1595,26 @@ def model_to_dict(model_instance, serialize=True): except KeyError: used_fallback_python_attribute_names.add(attr) if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res + if not value: + # empty list or None + result[attr] = value + else: + res = [] + for v in value: + if isinstance(v, PRIMITIVE_TYPES) or v is None: + res.append(v) + elif isinstance(v, ModelSimple): + res.append(v.value) + elif isinstance(v, dict): + res.append(dict(map(extract_item, v.items()))) + else: + res.append(model_to_dict(v, serialize=serialize)) + result[attr] = res elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) + result[attr] = dict(map(extract_item, value.items())) elif isinstance(value, ModelSimple): result[attr] = value.value - elif hasattr(value, '_data_store'): + elif hasattr(value, "_data_store"): result[attr] = model_to_dict(value, serialize=serialize) else: result[attr] = value @@ -1721,8 +1632,7 @@ def model_to_dict(model_instance, serialize=True): return result -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): +def type_error_message(var_value=None, var_name=None, valid_classes=None, key_type=None): """ Keyword Args: var_value (any): the variable which has the type_error @@ -1733,30 +1643,26 @@ def type_error_message(var_value=None, var_name=None, valid_classes=None, True if it is a key in a dict False if our item is an item in a list """ - key_or_value = 'value' + key_or_value = "value" if key_type: - key_or_value = 'key' + key_or_value = "key" valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) + msg = "Invalid type for variable '{0}'. Required {1} type {2} and passed type was {3}".format( + var_name, + key_or_value, + valid_classes_phrase, + type(var_value).__name__, ) return msg def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ + """Returns a string phrase describing what types are allowed""" all_classes = list(input_classes) all_classes = sorted(all_classes, key=lambda cls: cls.__name__) all_class_names = [cls.__name__ for cls in all_classes] if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) + return "is {0}".format(all_class_names[0]) return "is one of [{0}]".format(", ".join(all_class_names)) @@ -1778,10 +1684,10 @@ def get_allof_instances(self, model_args, constant_args): composed_instances (list) """ composed_instances = [] - for allof_class in self._composed_schemas['allOf']: + for allof_class in self._composed_schemas["allOf"]: try: - if constant_args.get('_spec_property_naming'): + if constant_args.get("_spec_property_naming"): allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) else: allof_instance = allof_class(**model_args, **constant_args) @@ -1790,12 +1696,7 @@ def get_allof_instances(self, model_args, constant_args): raise ApiValueError( "Invalid inputs given to generate an instance of '%s'. The " "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) + "schema '%s'. Error=%s" % (allof_class.__name__, allof_class.__name__, self.__class__.__name__, str(ex)) ) from ex return composed_instances @@ -1828,13 +1729,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): Returns oneof_instance (instance) """ - if len(cls._composed_schemas['oneOf']) == 0: + if len(cls._composed_schemas["oneOf"]) == 0: return None oneof_instances = [] # Iterate over each oneOf schema and determine if the input data # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: + for oneof_class in cls._composed_schemas["oneOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if oneof_class is none_type: @@ -1846,13 +1747,13 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): try: if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): + if constant_kwargs.get("_spec_property_naming"): oneof_instance = oneof_class._from_openapi_data(**model_kwargs, **constant_kwargs) else: oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) else: if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): + if constant_kwargs.get("_spec_property_naming"): oneof_instance = oneof_class._from_openapi_data(model_arg, **constant_kwargs) else: oneof_instance = oneof_class(model_arg, **constant_kwargs) @@ -1860,25 +1761,24 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): oneof_instance = validate_and_convert_types( model_arg, (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] + constant_kwargs["_path_to_item"], + constant_kwargs["_spec_property_naming"], + constant_kwargs["_check_type"], + configuration=constant_kwargs["_configuration"], ) oneof_instances.append(oneof_instance) except Exception: pass if len(oneof_instances) == 0: raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ + "Invalid inputs given to generate an instance of %s. None of the oneOf schemas matched the input data." + % cls.__name__ ) elif len(oneof_instances) > 1: raise ApiValueError( "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ + "oneOf schemas matched the inputs, but a max of one is allowed." + % cls.__name__ ) return oneof_instances[0] @@ -1898,10 +1798,10 @@ def get_anyof_instances(self, model_args, constant_args): anyof_instances (list) """ anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: + if len(self._composed_schemas["anyOf"]) == 0: return anyof_instances - for anyof_class in self._composed_schemas['anyOf']: + for anyof_class in self._composed_schemas["anyOf"]: # The composed oneOf schema allows the 'null' type and the input data # is the null value. This is a OAS >= 3.1 feature. if anyof_class is none_type: @@ -1910,7 +1810,7 @@ def get_anyof_instances(self, model_args, constant_args): continue try: - if constant_args.get('_spec_property_naming'): + if constant_args.get("_spec_property_naming"): anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) else: anyof_instance = anyof_class(**model_args, **constant_args) @@ -1919,9 +1819,8 @@ def get_anyof_instances(self, model_args, constant_args): pass if len(anyof_instances) == 0: raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ + "Invalid inputs given to generate an instance of %s. None of the anyOf schemas matched the inputs." + % self.__class__.__name__ ) return anyof_instances @@ -1935,7 +1834,7 @@ def get_discarded_args(self, composed_instances, model_args): # arguments passed to self were already converted to python names # before __init__ was called for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: + if instance.__class__ in self._composed_schemas["allOf"]: try: keys = instance.to_dict().keys() discarded_keys = model_args - keys @@ -2030,9 +1929,4 @@ def validate_get_composed_info(constant_args, model_args, self): if prop_name not in discarded_args: var_name_to_model_instances[prop_name] = [self] + composed_instances - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] + return [composed_instances, var_name_to_model_instances, additional_properties_model_instances, discarded_args] diff --git a/generated/groundlight_openapi_client/rest.py b/generated/groundlight_openapi_client/rest.py index 16efe8df..16d8ca86 100644 --- a/generated/groundlight_openapi_client/rest.py +++ b/generated/groundlight_openapi_client/rest.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import io import json import logging @@ -20,14 +19,20 @@ import urllib3 import ipaddress -from groundlight_openapi_client.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError +from groundlight_openapi_client.exceptions import ( + ApiException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException, + ApiValueError, +) logger = logging.getLogger(__name__) class RESTResponse(io.IOBase): - def __init__(self, resp): self.urllib3_response = resp self.status = resp.status @@ -44,7 +49,6 @@ def getheader(self, name, default=None): class RESTClientObject(object): - def __init__(self, configuration, pools_size=4, maxsize=None): # urllib3.PoolManager will pass all kw parameters to connectionpool # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 @@ -60,13 +64,13 @@ def __init__(self, configuration, pools_size=4, maxsize=None): addition_pool_args = {} if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + addition_pool_args["assert_hostname"] = configuration.assert_hostname # noqa: E501 if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries + addition_pool_args["retries"] = configuration.retries if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options + addition_pool_args["socket_options"] = configuration.socket_options if maxsize is None: if configuration.connection_pool_maxsize is not None: @@ -75,7 +79,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): maxsize = 4 # https pool manager - if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ''): + if configuration.proxy and not should_bypass_proxies(configuration.host, no_proxy=configuration.no_proxy or ""): self.pool_manager = urllib3.ProxyManager( num_pools=pools_size, maxsize=maxsize, @@ -85,7 +89,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): key_file=configuration.key_file, proxy_url=configuration.proxy, proxy_headers=configuration.proxy_headers, - **addition_pool_args + **addition_pool_args, ) else: self.pool_manager = urllib3.PoolManager( @@ -95,12 +99,20 @@ def __init__(self, configuration, pools_size=4, maxsize=None): ca_certs=configuration.ssl_ca_cert, cert_file=configuration.cert_file, key_file=configuration.key_file, - **addition_pool_args + **addition_pool_args, ) - def request(self, method, url, query_params=None, headers=None, - body=None, post_params=None, _preload_content=True, - _request_timeout=None): + def request( + self, + method, + url, + query_params=None, + headers=None, + body=None, + post_params=None, + _preload_content=True, + _request_timeout=None, + ): """Perform requests. :param method: http request method @@ -120,13 +132,10 @@ def request(self, method, url, query_params=None, headers=None, (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 {} @@ -135,60 +144,66 @@ def request(self, method, url, query_params=None, headers=None, if _request_timeout: if isinstance(_request_timeout, (int, float)): # noqa: E501,F821 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"]: # Only set a default Content-Type for POST, PUT, PATCH and OPTIONS requests - if (method != 'DELETE') and ('Content-Type' not in headers): - headers['Content-Type'] = 'application/json' + if (method != "DELETE") and ("Content-Type" not in headers): + headers["Content-Type"] = "application/json" if query_params: - url += '?' + urlencode(query_params) - if ('Content-Type' not in headers) or (re.search('json', headers['Content-Type'], re.IGNORECASE)): + url += "?" + urlencode(query_params) + if ("Content-Type" not in headers) or (re.search("json", headers["Content-Type"], re.IGNORECASE)): request_body = None if body is not None: request_body = json.dumps(body) r = self.pool_manager.request( - method, url, + method, + url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + headers=headers, + ) + elif headers["Content-Type"] == "application/x-www-form-urlencoded": # noqa: E501 r = self.pool_manager.request( - method, url, + method, + url, fields=post_params, encode_multipart=False, preload_content=_preload_content, timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': + headers=headers, + ) + elif headers["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, + method, + url, fields=post_params, encode_multipart=True, preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + ) # 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, + method, + url, body=request_body, preload_content=_preload_content, timeout=timeout, - headers=headers) + headers=headers, + ) else: # Cannot generate the request from given parameters msg = """Cannot prepare a request message for provided @@ -197,11 +212,9 @@ def request(self, method, url, query_params=None, headers=None, raise ApiException(status=0, reason=msg) # For `GET`, `HEAD` else: - r = self.pool_manager.request(method, url, - fields=query_params, - preload_content=_preload_content, - timeout=timeout, - headers=headers) + r = self.pool_manager.request( + method, url, fields=query_params, preload_content=_preload_content, timeout=timeout, headers=headers + ) except urllib3.exceptions.SSLError as e: msg = "{0}\n{1}".format(type(e).__name__, str(e)) raise ApiException(status=0, reason=msg) @@ -229,84 +242,134 @@ def request(self, method, url, query_params=None, headers=None, return r - def GET(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("GET", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def HEAD(self, url, headers=None, query_params=None, _preload_content=True, - _request_timeout=None): - return self.request("HEAD", url, - headers=headers, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - query_params=query_params) - - def OPTIONS(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("OPTIONS", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def DELETE(self, url, headers=None, query_params=None, body=None, - _preload_content=True, _request_timeout=None): - return self.request("DELETE", url, - headers=headers, - query_params=query_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def POST(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("POST", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PUT(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PUT", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) - - def PATCH(self, url, headers=None, query_params=None, post_params=None, - body=None, _preload_content=True, _request_timeout=None): - return self.request("PATCH", url, - headers=headers, - query_params=query_params, - post_params=post_params, - _preload_content=_preload_content, - _request_timeout=_request_timeout, - body=body) + def GET(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + return self.request( + "GET", + url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params, + ) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, _request_timeout=None): + return self.request( + "HEAD", + url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params, + ) + + def OPTIONS( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "OPTIONS", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def DELETE(self, url, headers=None, query_params=None, body=None, _preload_content=True, _request_timeout=None): + return self.request( + "DELETE", + url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def POST( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "POST", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def PUT( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "PUT", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + + def PATCH( + self, + url, + headers=None, + query_params=None, + post_params=None, + body=None, + _preload_content=True, + _request_timeout=None, + ): + return self.request( + "PATCH", + url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body, + ) + # end of class RESTClientObject def is_ipv4(target): - """ Test if IPv4 address or not - """ + """Test if IPv4 address or not""" try: - chk = ipaddress.IPv4Address(target) - return True + chk = ipaddress.IPv4Address(target) + return True except ipaddress.AddressValueError: - return False + return False + def in_ipv4net(target, net): - """ Test if target belongs to given IPv4 network - """ + """Test if target belongs to given IPv4 network""" try: nw = ipaddress.IPv4Network(net) ip = ipaddress.IPv4Address(target) @@ -318,30 +381,29 @@ def in_ipv4net(target, net): except ipaddress.NetmaskValueError: return False + def should_bypass_proxies(url, no_proxy=None): - """ Yet another requests.should_bypass_proxies + """Yet another requests.should_bypass_proxies Test if proxies should not be used for a particular url. """ parsed = urlparse(url) # special cases - if parsed.hostname in [None, '']: + if parsed.hostname in [None, ""]: return True # special cases - if no_proxy in [None , '']: + if no_proxy in [None, ""]: return False - if no_proxy == '*': + if no_proxy == "*": return True - no_proxy = no_proxy.lower().replace(' ',''); - entries = ( - host for host in no_proxy.split(',') if host - ) + no_proxy = no_proxy.lower().replace(" ", "") + entries = (host for host in no_proxy.split(",") if host) if is_ipv4(parsed.hostname): for item in entries: - if in_ipv4net(parsed.hostname, item): - return True - return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} ) + if in_ipv4net(parsed.hostname, item): + return True + return proxy_bypass_environment(parsed.hostname, {"no": no_proxy}) diff --git a/generated/model.py b/generated/model.py index 1de65384..9d187a74 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,14 +1,13 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-08-28T18:43:04+00:00 +# timestamp: 2025-10-20T16:50:10+00:00 from __future__ import annotations -from datetime import datetime from enum import Enum from typing import Any, Dict, List, Optional, Union -from pydantic import AnyUrl, BaseModel, Field, RootModel, confloat, conint, constr +from pydantic import AnyUrl, AwareDatetime, BaseModel, Field, RootModel, confloat, conint, constr class AccountMonthToDateInfo(BaseModel): @@ -184,7 +183,7 @@ class WebhookAction(BaseModel): payload_template: Optional[PayloadTemplate] = None last_message_failed: Optional[bool] = None last_failure_error: Optional[str] = None - last_failed_at: Optional[datetime] = None + last_failed_at: Optional[AwareDatetime] = None class WebhookActionRequest(BaseModel): @@ -193,7 +192,7 @@ class WebhookActionRequest(BaseModel): payload_template: Optional[PayloadTemplateRequest] = None last_message_failed: Optional[bool] = None last_failure_error: Optional[str] = None - last_failed_at: Optional[datetime] = None + last_failed_at: Optional[AwareDatetime] = None class ResultType(Enum): @@ -324,6 +323,13 @@ class VerbEnum(str, Enum): NO_QUERIES = "NO_QUERIES" +class BoundingBoxLabelEnum(str, Enum): + NO_OBJECTS = "NO_OBJECTS" + BOUNDING_BOX = "BOUNDING_BOX" + GREATER_THAN_MAX = "GREATER_THAN_MAX" + UNCLEAR = "UNCLEAR" + + class Source(str, Enum): STILL_PROCESSING = "STILL_PROCESSING" CLOUD = "CLOUD" @@ -363,7 +369,7 @@ class Detector(BaseModel): id: str = Field(..., description="A unique ID for this object.") type: DetectorTypeEnum = Field(..., description="The type of this object.") - created_at: datetime = Field(..., description="When this detector was created.") + created_at: AwareDatetime = Field(..., description="When this detector was created.") name: constr(max_length=200) = Field(..., description="A short, descriptive name for the detector.") query: str = Field(..., description="A question about the image.") group_name: str = Field(..., description="Which group should this detector be part of?") @@ -432,7 +438,7 @@ class ImageQuery(BaseModel): metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the image query.") id: str = Field(..., description="A unique ID for this object.") type: ImageQueryTypeEnum = Field(..., description="The type of this object.") - created_at: datetime = Field(..., description="When was this detector created?") + created_at: AwareDatetime = Field(..., description="When was this detector created?") query: str = Field(..., description="A question about the image.") detector_id: str = Field(..., description="Which detector was used on this image query?") result_type: ResultTypeEnum = Field(..., description="What type of result are we returning?") @@ -466,7 +472,7 @@ class LabelValue(BaseModel): ) rois: Optional[List[ROI]] = None annotations_requested: List[str] - created_at: datetime + created_at: AwareDatetime detector_id: Optional[int] = Field(...) source: str text: Optional[str] = Field(..., description="Text annotations") @@ -479,16 +485,16 @@ class LabelValueRequest(BaseModel): class PaginatedDetectorList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[Detector] class PaginatedImageQueryList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[ImageQuery] @@ -545,7 +551,7 @@ class RuleRequest(BaseModel): class PaginatedRuleList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[Rule] diff --git a/generated/setup.py b/generated/setup.py index 4366b879..9c4bb572 100644 --- a/generated/setup.py +++ b/generated/setup.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - from setuptools import setup, find_packages # noqa: H301 NAME = "groundlight-openapi-client" @@ -21,8 +20,8 @@ # http://pypi.python.org/pypi/setuptools REQUIRES = [ - "urllib3 >= 1.25.3", - "python-dateutil", + "urllib3 >= 1.25.3", + "python-dateutil", ] setup( @@ -39,5 +38,5 @@ include_package_data=True, long_description="""\ Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 - """ + """, ) diff --git a/generated/test/test_bounding_box_label_enum.py b/generated/test/test_bounding_box_label_enum.py index 31c4df49..2d15f47d 100644 --- a/generated/test/test_bounding_box_label_enum.py +++ b/generated/test/test_bounding_box_label_enum.py @@ -8,7 +8,6 @@ Generated by: https://openapi-generator.tech """ - import sys import unittest @@ -32,5 +31,5 @@ def testBoundingBoxLabelEnum(self): pass -if __name__ == '__main__': +if __name__ == "__main__": unittest.main() diff --git a/pyproject.toml b/pyproject.toml index 5038df0d..4573cd32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ typer = "^0.15.4" urllib3 = "^2.5.0" [tool.poetry.group.dev.dependencies] -datamodel-code-generator = "^0.22.1" +datamodel-code-generator = "^0.25.0" pre-commit = "^2.0.0" pytest = "^7.0.1" pytest-cov = "^3.0.0" From 83e70b6587c63c33afaac90d8d4962a2b482b84d Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Mon, 20 Oct 2025 17:20:36 +0000 Subject: [PATCH 5/6] datamodel-code-generator 0.23.0 --- generated/model.py | 33 +++++++++++++++++---------------- pyproject.toml | 2 +- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/generated/model.py b/generated/model.py index 9d187a74..4f4843da 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,13 +1,14 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-10-20T16:50:10+00:00 +# timestamp: 2025-10-20T17:20:11+00:00 from __future__ import annotations +from datetime import datetime from enum import Enum from typing import Any, Dict, List, Optional, Union -from pydantic import AnyUrl, AwareDatetime, BaseModel, Field, RootModel, confloat, conint, constr +from pydantic import AnyUrl, BaseModel, Field, RootModel, confloat, conint, constr class AccountMonthToDateInfo(BaseModel): @@ -183,7 +184,7 @@ class WebhookAction(BaseModel): payload_template: Optional[PayloadTemplate] = None last_message_failed: Optional[bool] = None last_failure_error: Optional[str] = None - last_failed_at: Optional[AwareDatetime] = None + last_failed_at: Optional[datetime] = None class WebhookActionRequest(BaseModel): @@ -192,7 +193,7 @@ class WebhookActionRequest(BaseModel): payload_template: Optional[PayloadTemplateRequest] = None last_message_failed: Optional[bool] = None last_failure_error: Optional[str] = None - last_failed_at: Optional[AwareDatetime] = None + last_failed_at: Optional[datetime] = None class ResultType(Enum): @@ -369,7 +370,7 @@ class Detector(BaseModel): id: str = Field(..., description="A unique ID for this object.") type: DetectorTypeEnum = Field(..., description="The type of this object.") - created_at: AwareDatetime = Field(..., description="When this detector was created.") + created_at: datetime = Field(..., description="When this detector was created.") name: constr(max_length=200) = Field(..., description="A short, descriptive name for the detector.") query: str = Field(..., description="A question about the image.") group_name: str = Field(..., description="Which group should this detector be part of?") @@ -438,7 +439,7 @@ class ImageQuery(BaseModel): metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the image query.") id: str = Field(..., description="A unique ID for this object.") type: ImageQueryTypeEnum = Field(..., description="The type of this object.") - created_at: AwareDatetime = Field(..., description="When was this detector created?") + created_at: datetime = Field(..., description="When was this detector created?") query: str = Field(..., description="A question about the image.") detector_id: str = Field(..., description="Which detector was used on this image query?") result_type: ResultTypeEnum = Field(..., description="What type of result are we returning?") @@ -472,7 +473,7 @@ class LabelValue(BaseModel): ) rois: Optional[List[ROI]] = None annotations_requested: List[str] - created_at: AwareDatetime + created_at: datetime detector_id: Optional[int] = Field(...) source: str text: Optional[str] = Field(..., description="Text annotations") @@ -485,16 +486,16 @@ class LabelValueRequest(BaseModel): class PaginatedDetectorList(BaseModel): - count: int = Field(..., examples=[123]) - next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) - previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) + count: int = Field(..., example=123) + next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") + previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") results: List[Detector] class PaginatedImageQueryList(BaseModel): - count: int = Field(..., examples=[123]) - next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) - previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) + count: int = Field(..., example=123) + next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") + previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") results: List[ImageQuery] @@ -551,7 +552,7 @@ class RuleRequest(BaseModel): class PaginatedRuleList(BaseModel): - count: int = Field(..., examples=[123]) - next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) - previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) + count: int = Field(..., example=123) + next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") + previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") results: List[Rule] diff --git a/pyproject.toml b/pyproject.toml index 4573cd32..a307c6de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ typer = "^0.15.4" urllib3 = "^2.5.0" [tool.poetry.group.dev.dependencies] -datamodel-code-generator = "^0.25.0" +datamodel-code-generator = "^0.23.0" pre-commit = "^2.0.0" pytest = "^7.0.1" pytest-cov = "^3.0.0" From f4a9668429446ea30f8565c534c97847629cf9a1 Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Mon, 20 Oct 2025 17:37:06 +0000 Subject: [PATCH 6/6] 0.35.0 --- Makefile | 2 +- generated/model.py | 20 ++++++++++---------- pyproject.toml | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 816bfcdc..f9abe53f 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ generate: install-generator ## Generate the SDK from our public openapi spec -o ./generated \ --additional-properties=packageName=groundlight_openapi_client # strict-nullable makes nullable fields Optional in the generated Pydantic classes: https://github.com/koxudaxi/datamodel-code-generator/issues/327 - poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description --output-model-type pydantic_v2.BaseModel --use-subclass-enum + poetry run datamodel-codegen --input spec/public-api.yaml --output generated/model.py --strict-nullable --use-schema-description --output-model-type pydantic_v2.BaseModel --use-subclass-enum --output-datetime-class datetime poetry run black . PYTEST=poetry run pytest -v diff --git a/generated/model.py b/generated/model.py index 4f4843da..beb0d978 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2025-10-20T17:20:11+00:00 +# timestamp: 2025-10-20T17:36:39+00:00 from __future__ import annotations @@ -486,16 +486,16 @@ class LabelValueRequest(BaseModel): class PaginatedDetectorList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[Detector] class PaginatedImageQueryList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[ImageQuery] @@ -552,7 +552,7 @@ class RuleRequest(BaseModel): class PaginatedRuleList(BaseModel): - count: int = Field(..., example=123) - next: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=4") - previous: Optional[AnyUrl] = Field(None, example="http://api.example.org/accounts/?page=2") + count: int = Field(..., examples=[123]) + next: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=4"]) + previous: Optional[AnyUrl] = Field(None, examples=["http://api.example.org/accounts/?page=2"]) results: List[Rule] diff --git a/pyproject.toml b/pyproject.toml index a307c6de..a78bc032 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ typer = "^0.15.4" urllib3 = "^2.5.0" [tool.poetry.group.dev.dependencies] -datamodel-code-generator = "^0.23.0" +datamodel-code-generator = "^0.35.0" pre-commit = "^2.0.0" pytest = "^7.0.1" pytest-cov = "^3.0.0"